dm: ima: avoid extra calls to strlen()
authorDmitry Antipov <dmantipov@yandex.ru>
Thu, 26 Jun 2025 16:07:50 +0000 (19:07 +0300)
committerMikulas Patocka <mpatocka@redhat.com>
Fri, 27 Jun 2025 11:07:17 +0000 (13:07 +0200)
commitebbd17695e9e1f4c3cdb36149c8b8f38b585e14d
tree03f7948a859e86c37212a777ad18f31100a22c79
parent548d88f74ed49c3c9dbd68550b7b335c2afa6413
dm: ima: avoid extra calls to strlen()

Since 'scnprintf()' returns the number of characters emitted (not
including the trailing '\0'), use that return value instead of the
subsequent calls to 'strlen()' where appropriate. Compile tested only.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-ima.c