diff options
author | Ruediger Meier | 2017-06-15 08:56:01 +0200 |
---|---|---|
committer | Ruediger Meier | 2017-06-15 08:56:01 +0200 |
commit | 0b5f75e412ac613478b44a7c02680d1578a48c0f (patch) | |
tree | ec681b47f228e43c492cf8d723e0ce2b00fa3b96 /libmount/src/tab.c | |
parent | more: remove unused variable (diff) | |
download | kernel-qcow2-util-linux-0b5f75e412ac613478b44a7c02680d1578a48c0f.tar.gz kernel-qcow2-util-linux-0b5f75e412ac613478b44a7c02680d1578a48c0f.tar.xz kernel-qcow2-util-linux-0b5f75e412ac613478b44a7c02680d1578a48c0f.zip |
libmount: fix warning "set but not used"
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'libmount/src/tab.c')
-rw-r--r-- | libmount/src/tab.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libmount/src/tab.c b/libmount/src/tab.c index 10da730e3..760b95b5f 100644 --- a/libmount/src/tab.c +++ b/libmount/src/tab.c @@ -1422,7 +1422,6 @@ struct libmnt_fs *mnt_table_get_fs_root(struct libmnt_table *tb, { char *root = NULL; const char *mnt = NULL; - const char *fstype; struct libmnt_fs *src_fs = NULL; assert(fs); @@ -1430,8 +1429,6 @@ struct libmnt_fs *mnt_table_get_fs_root(struct libmnt_table *tb, DBG(TAB, ul_debug("lookup fs-root for '%s'", mnt_fs_get_source(fs))); - fstype = mnt_fs_get_fstype(fs); - if (tb && (mountflags & MS_BIND)) { const char *src, *src_root; char *xsrc = NULL; @@ -1496,7 +1493,8 @@ struct libmnt_fs *mnt_table_get_fs_root(struct libmnt_table *tb, /* * btrfs-subvolume mount -- get subvolume name and use it as a root-fs path */ - else if (tb && fstype && (!strcmp(fstype, "btrfs") || !strcmp(fstype, "auto"))) { + else if (tb && fs->fstype && + (!strcmp(fs->fstype, "btrfs") || !strcmp(fs->fstype, "auto"))) { if (get_btrfs_fs_root(tb, fs, &root) < 0) goto err; } |