From ba2bdf41c436640286df40529cddede46b3ba5d8 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 4 Dec 2012 14:22:39 +0100 Subject: 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 --- libmount/src/fs.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libmount/src/fs.c') diff --git a/libmount/src/fs.c b/libmount/src/fs.c index 6e0c4e645..d94476870 100644 --- a/libmount/src/fs.c +++ b/libmount/src/fs.c @@ -1184,6 +1184,8 @@ int mnt_fs_get_option(struct libmnt_fs *fs, const char *name, { char rc = 1; + if (!fs) + return -EINVAL; if (fs->fs_optstr) rc = mnt_optstr_get_option(fs->fs_optstr, name, value, valsz); if (rc == 1 && fs->vfs_optstr) -- cgit v1.2.3-55-g7522