]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: cleanup nonnull attribute usage
authorKarel Zak <kzak@redhat.com>
Tue, 4 Dec 2012 10:58:13 +0000 (11:58 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 4 Dec 2012 11:08:53 +0000 (12:08 +0100)
commit2e31fe2303e4938ef735aebf13aa5b22fb031af9
tree4dff61f83c3f5fb55aa62619e1cc0f85b8558a08
parent3c88fb56b6c2862e0d3d4f50149242e58681cb0f
libblkid: cleanup nonnull attribute usage

 - don't mix __attribute__((nonnull)) and "if (!argument) return" for
   the same function. The "if ()" check will be *silently* optimized
   out by gcc.

 - use __attribute__((nonnull)) for functions where is impossible to
   return error code. For example "is" and "has" functions or functions
   where we return unsigned types and zero is a valid value.

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/blkid.h.in