diff --git a/libselinux/src/label_file.c b/libselinux/src/label_file.c index 560d8c3d..dbf51a93 100644 --- a/libselinux/src/label_file.c +++ b/libselinux/src/label_file.c @@ -232,7 +232,7 @@ end_arch_check: /* allocate the stems_data array */ rc = next_entry(&stem_map_len, mmap_area, sizeof(uint32_t)); - if (rc < 0 || !stem_map_len) + if (rc < 0) return -1; /* diff --git a/libselinux/src/regex.c b/libselinux/src/regex.c index dfc15d63..a6fcbbfe 100644 --- a/libselinux/src/regex.c +++ b/libselinux/src/regex.c @@ -348,7 +348,7 @@ int regex_load_mmap(struct mmap_area *mmap_area, struct regex_data **regex, goto err; rc = next_entry(&entry_len, mmap_area, sizeof(uint32_t)); - if (rc < 0 || !entry_len) + if (rc < 0) goto err; if (entry_len) {