[PATCH 34/38] misc/tune2fs: fix setting fsuuid::fsu_len

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Eric Biggers <ebiggers@xxxxxxxxxx>

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 <bongiojp@xxxxxxxxx>
Reviewed-by: Lukas Czerner <lczerner@xxxxxxxxxx>
Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
---
 misc/tune2fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 088f87e53..7937b8b56 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -3622,7 +3622,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);
-- 
2.39.0




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux