]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
libext2: minor sparse endian checker fixup
authorEric Sandeen <sandeen@redhat.com>
Tue, 4 Nov 2014 16:26:23 +0000 (11:26 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 4 Nov 2014 16:26:23 +0000 (11:26 -0500)
The sparse checker treats 0 assignments as special, but
doesn't catch a = b = 0; separate them to make it quieter.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/extent.c

index c9ef701c66f7f1e4727910872939e7cf137f04af..ca5b78b8a4838707a4d6d9f4ff09c0800ef3f5aa 100644 (file)
@@ -1651,8 +1651,10 @@ errcode_t ext2fs_extent_delete(ext2_extent_handle_t handle, int flags)
        } else {
                eh = (struct ext3_extent_header *) path->buf;
                eh->eh_entries = ext2fs_cpu_to_le16(path->entries);
-               if ((path->entries == 0) && (handle->level == 0))
-                       eh->eh_depth = handle->max_depth = 0;
+               if ((path->entries == 0) && (handle->level == 0)) {
+                       eh->eh_depth = 0;
+                       handle->max_depth = 0;
+               }
                retval = update_path(handle);
        }
        return retval;