diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2013-03-06 14:17:59 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2013-03-08 10:09:31 +0100 |
commit | 5f1be48b264e4d556f688062cc6f4a1e03f9f455 (patch) | |
tree | c33437f3ab4a6c06a3a554ba09ae62b92d1c6626 /src/shared/set.h | |
parent | 0be8342c04bbf129b4a21e5073eacccbbce4e896 (diff) |
shared: remove pointless checks in auto-cleanup functions
The argument given to the __attribute__((cleanup)) functions is the
address of the variable that's going out of scope. It cannot be NULL.
The "if (!s)" check in set_freep() is pointless.
Perhaps "if (!*s)" was intented. But that's pointless too, because
set_free()/set_free_free() are OK to call with a NULL argument (just
like free()).
Setting "*s = NULL" is pointless, because the variable that s points
to is about to go out of scope.
The same holds for strv_freep().
Diffstat (limited to 'src/shared/set.h')
0 files changed, 0 insertions, 0 deletions