From de4f0ad497b0c1cb38b0dc12b550e8a6c6581472 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sat, 21 Jan 2023 12:32:26 -0800 Subject: [PATCH] misc/tune2fs: fix setting fsuuid::fsu_len Minus does not mean equals. Besides fixing an obvious bug, this avoids the following compiler warning with clang -Wall: tune2fs.c:3625:20: warning: expression result unused [-Wunused-value] fsuuid->fsu_len - UUID_SIZE; ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~ Fixes: a83e199da0ca ("tune2fs: Add support for get/set UUID ioctls.") Reviewed-by: Jeremy Bongio Reviewed-by: Lukas Czerner Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o --- misc/tune2fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/tune2fs.c b/misc/tune2fs.c index 5fe22e6..2f7d9f3 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -3627,7 +3627,7 @@ _("Warning: The journal is dirty. You may wish to replay the journal like:\n\n" ret = -1; #ifdef __linux__ if (fsuuid) { - fsuuid->fsu_len - UUID_SIZE; + fsuuid->fsu_len = UUID_SIZE; fsuuid->fsu_flags = 0; memcpy(&fsuuid->fsu_uuid, new_uuid, UUID_SIZE); ret = ioctl(fd, EXT4_IOC_SETFSUUID, fsuuid); -- 1.8.3.1