summaryrefslogtreecommitdiffstats
path: root/libmount/src/lock.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/lock.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/lock.c')
-rw-r--r--libmount/src/lock.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/libmount/src/lock.c b/libmount/src/lock.c
index b149b6f8b..e5393d0a4 100644
--- a/libmount/src/lock.c
+++ b/libmount/src/lock.c
@@ -53,9 +53,6 @@ struct libmnt_lock *mnt_new_lock(const char *datafile, pid_t id)
char *lo = NULL, *ln = NULL;
size_t losz;
- if (!datafile)
- return NULL;
-
/* for flock we use "foo.lock, for mtab "foo~"
*/
losz = strlen(datafile) + sizeof(".lock");