diff options
author | Sami Kerola | 2017-05-28 11:21:48 +0200 |
---|---|---|
committer | Karel Zak | 2017-06-14 12:19:20 +0200 |
commit | 1b5042636fa92c977d9a033f685ceb7f3c4c5fc9 (patch) | |
tree | 39b83786d289855a5ba6cb51fe0ac10e2707e481 /misc-utils/findmnt.c | |
parent | isosize: avoid reading more data than what is needed (diff) | |
download | kernel-qcow2-util-linux-1b5042636fa92c977d9a033f685ceb7f3c4c5fc9.tar.gz kernel-qcow2-util-linux-1b5042636fa92c977d9a033f685ceb7f3c4c5fc9.tar.xz kernel-qcow2-util-linux-1b5042636fa92c977d9a033f685ceb7f3c4c5fc9.zip |
misc: fix reassigned values before old ones has been used [cppcheck]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'misc-utils/findmnt.c')
-rw-r--r-- | misc-utils/findmnt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c index 86b6b9aa1..93c0e90ef 100644 --- a/misc-utils/findmnt.c +++ b/misc-utils/findmnt.c @@ -873,7 +873,7 @@ static void cache_set_targets(struct libmnt_cache *tmp) static int tab_is_tree(struct libmnt_table *tb) { struct libmnt_fs *fs = NULL; - struct libmnt_iter *itr = NULL; + struct libmnt_iter *itr; int rc = 0; itr = mnt_new_iter(MNT_ITER_BACKWARD); @@ -892,7 +892,7 @@ static int tab_is_tree(struct libmnt_table *tb) static int tab_is_kernel(struct libmnt_table *tb) { struct libmnt_fs *fs = NULL; - struct libmnt_iter *itr = NULL; + struct libmnt_iter *itr; itr = mnt_new_iter(MNT_ITER_BACKWARD); if (!itr) @@ -1008,7 +1008,7 @@ again: static int add_matching_lines(struct libmnt_table *tb, struct libscols_table *table, int direction) { - struct libmnt_iter *itr = NULL; + struct libmnt_iter *itr; struct libmnt_fs *fs; int nlines = 0, rc = -1; @@ -1068,7 +1068,7 @@ static int poll_table(struct libmnt_table *tb, const char *tabfile, FILE *f = NULL; int rc = -1; struct libmnt_iter *itr = NULL; - struct libmnt_table *tb_new = NULL; + struct libmnt_table *tb_new; struct libmnt_tabdiff *diff = NULL; struct pollfd fds[1]; |