libext2: minor sparse endian checker fixup

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>
crypto
Eric Sandeen 2014-11-04 11:26:23 -05:00 committed by Theodore Ts'o
parent 77b493e35b
commit 8f358e58fe
1 changed files with 4 additions and 2 deletions

View 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;