I would recommend just initializing the variables to NULL and keeping<snip>
the "goto exit"'s. That would maintain the single return point, allows
for extra cleanup code to be run in the future if necessary, and is
consistent with the rest of the module_to_cil code.
FYI these functions have multiple return paths, so that statement isn't even true for module_to_cil code:
roles_gather_map()
typealiases_gather_map()
stack_destroy()
is_id_in_scope_with_start()
Functions that always return 0:
semantic_level_to_cil()
cil_print_attr_strs()
Some functions have double sets to -1 on rc, the compiler should be smart enough to disregard those, but
still, no consistency on when/where rc = -1 is set.
ebitmap_to_names()
I only went through 36% of the file and noticed all these.
On a separate note, Coverity has free scanning for open source projects, perhaps we should put selinux project in there
and get it scanning. It will likely pick up a lot of stuff.
On a separate note, Coverity has free scanning for open source projects, perhaps we should put selinux project in there
and get it scanning. It will likely pick up a lot of stuff.
_______________________________________________ Selinux mailing list Selinux@xxxxxxxxxxxxx To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.