summaryrefslogtreecommitdiffstats
path: root/libmount/src/tab_update.c
diff options
context:
space:
mode:
authorKarel Zak2012-12-04 14:22:39 +0100
committerKarel Zak2012-12-04 14:22:39 +0100
commitba2bdf41c436640286df40529cddede46b3ba5d8 (patch)
tree2fd343c6a2450b4566ca996ff2f0c9703bc2e680 /libmount/src/tab_update.c
parentlibblkid: re-read PART{UUID,LABEL} for successfully verified cached devices (diff)
downloadkernel-qcow2-util-linux-ba2bdf41c436640286df40529cddede46b3ba5d8.tar.gz
kernel-qcow2-util-linux-ba2bdf41c436640286df40529cddede46b3ba5d8.tar.xz
kernel-qcow2-util-linux-ba2bdf41c436640286df40529cddede46b3ba5d8.zip
libmount: clean nonnull attribute usage
- use __attribute__((nonnull) for functions where we not able to return an return code ("is", "has" and some "get" functions). - use __attribute__((nonnull) for small functions where we always modify any of the function argument (some mnt_optstr_* functions) Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/tab_update.c')
-rw-r--r--libmount/src/tab_update.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libmount/src/tab_update.c b/libmount/src/tab_update.c
index 4f04c8ecd..7ae540abf 100644
--- a/libmount/src/tab_update.c
+++ b/libmount/src/tab_update.c
@@ -87,6 +87,8 @@ int mnt_update_set_filename(struct libmnt_update *upd, const char *filename,
int rw = 0;
assert(upd);
+ if (!upd)
+ return -EINVAL;
/* filename explicitly defined */
if (filename) {