gen_init_cpio: avoid duplicate strlen calls
authorDavid Disseldorp <ddiss@suse.de>
Tue, 19 Aug 2025 03:05:47 +0000 (13:05 +1000)
committerNathan Chancellor <nathan@kernel.org>
Wed, 20 Aug 2025 23:02:56 +0000 (16:02 -0700)
commit348ff9e3c1cf1a4124be1c94937dfc131bf6be29
tree5dbb07a60e939e2c80bbe08f60c723c88c295700
parent97169cd6d95b338f2dbf5d3154b7d2233fce7d8a
gen_init_cpio: avoid duplicate strlen calls

We determine the filename length for the cpio header, so shouldn't
recalculate it when writing out the filename.

Signed-off-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Link: https://lore.kernel.org/r/20250819032607.28727-5-ddiss@suse.de
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
usr/gen_init_cpio.c