]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mkfs.cramfs: remove redundant condition
authorKarel Zak <kzak@redhat.com>
Wed, 18 Jul 2018 07:46:40 +0000 (09:46 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 18 Jul 2018 07:46:40 +0000 (09:46 +0200)
util-linux-2.32.1/disk-utils/mkfs.cramfs.c:362]: (style) Redundant condition: If 'EXPR >= 16777216', the comparison 'EXPR' is always true.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/mkfs.cramfs.c

index 7104d50af38034b58f229d3df06c1d082191d6f9..1042ac1b4ef06b809924b6a6c6ef16cadce3c5ec 100644 (file)
@@ -359,7 +359,7 @@ static unsigned int parse_directory(struct entry *root_entry, const char *name,
                        entry->size = parse_directory(root_entry, path, &entry->child, fslen_ub);
                } else if (S_ISREG(st.st_mode)) {
                        entry->path = xstrdup(path);
-                       if (entry->size && entry->size >= (1 << CRAMFS_SIZE_WIDTH)) {
+                       if (entry->size >= (1 << CRAMFS_SIZE_WIDTH)) {
                                warn_size = 1;
                                entry->size = (1 << CRAMFS_SIZE_WIDTH) - 1;
                        }