btrfs-progs: replace a confusing raw number with a macro
authorGui Hecheng <guihc.fnst@cn.fujitsu.com>
Thu, 17 Jul 2014 02:40:38 +0000 (10:40 +0800)
committerDavid Sterba <dsterba@suse.cz>
Fri, 22 Aug 2014 13:07:01 +0000 (15:07 +0200)
The raw number 36 for the uuid string length is somewhat confusing,
use a macro to define replace it.

Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
[Use BTRFS_UUID_UNPARSED_SIZE]
Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-scrub.c

index 1d93942..d4acfd2 100644 (file)
@@ -550,7 +550,7 @@ again:
                                ;
                        if (i + j + 1 >= avail)
                                _SCRUB_INVALID;
-                       if (j != 36)
+                       if (j != BTRFS_UUID_UNPARSED_SIZE - 1)
                                _SCRUB_INVALID;
                        l[i + j] = '\0';
                        ret = uuid_parse(l + i, p[curr]->fsid);