diff options
author | Karel Zak | 2015-02-16 14:17:54 +0100 |
---|---|---|
committer | Karel Zak | 2015-02-16 14:17:54 +0100 |
commit | 37290a53960dcd7f71e948576b9978bf685d9012 (patch) | |
tree | 2846a160de656ea320057e6e6e83ff01bd4ea139 /libmount/src/tab_parse.c | |
parent | libsmartcols: remove assert(arg) from public functions (diff) | |
download | kernel-qcow2-util-linux-37290a53960dcd7f71e948576b9978bf685d9012.tar.gz kernel-qcow2-util-linux-37290a53960dcd7f71e948576b9978bf685d9012.tar.xz kernel-qcow2-util-linux-37290a53960dcd7f71e948576b9978bf685d9012.zip |
libmount: remove assert(arg) from public functions
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/tab_parse.c')
-rw-r--r-- | libmount/src/tab_parse.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c index 0f87730ee..ca8a61883 100644 --- a/libmount/src/tab_parse.c +++ b/libmount/src/tab_parse.c @@ -676,9 +676,6 @@ int mnt_table_parse_file(struct libmnt_table *tb, const char *filename) FILE *f; int rc; - assert(tb); - assert(filename); - if (!filename || !tb) return -EINVAL; @@ -823,7 +820,6 @@ struct libmnt_table *__mnt_new_table_from_file(const char *filename, int fmt) struct libmnt_table *tb; struct stat st; - assert(filename); if (!filename) return NULL; if (stat(filename, &st)) @@ -852,7 +848,9 @@ struct libmnt_table *__mnt_new_table_from_file(const char *filename, int fmt) */ struct libmnt_table *mnt_new_table_from_file(const char *filename) { - assert(filename); + if (!filename) + return NULL; + return __mnt_new_table_from_file(filename, MNT_FMT_GUESS); } @@ -866,7 +864,6 @@ struct libmnt_table *mnt_new_table_from_dir(const char *dirname) { struct libmnt_table *tb; - assert(dirname); if (!dirname) return NULL; tb = mnt_new_table(); @@ -896,7 +893,6 @@ struct libmnt_table *mnt_new_table_from_dir(const char *dirname) int mnt_table_set_parser_errcb(struct libmnt_table *tb, int (*cb)(struct libmnt_table *tb, const char *filename, int line)) { - assert(tb); if (!tb) return -EINVAL; tb->errcb = cb; @@ -911,7 +907,6 @@ int mnt_table_set_parser_fltrcb(struct libmnt_table *tb, int (*cb)(struct libmnt_fs *, void *), void *data) { - assert(tb); if (!tb) return -EINVAL; @@ -934,8 +929,6 @@ int mnt_table_set_parser_fltrcb(struct libmnt_table *tb, */ int mnt_table_parse_swaps(struct libmnt_table *tb, const char *filename) { - assert(tb); - if (!tb) return -EINVAL; if (!filename) { @@ -966,7 +959,6 @@ int mnt_table_parse_fstab(struct libmnt_table *tb, const char *filename) struct stat st; int rc = 0; - assert(tb); if (!tb) return -EINVAL; if (!filename) @@ -1002,8 +994,6 @@ static struct libmnt_fs *mnt_table_merge_user_fs(struct libmnt_table *tb, struct struct libmnt_iter itr; const char *optstr, *src, *target, *root, *attrs; - assert(tb); - assert(uf); if (!tb || !uf) return NULL; |