aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ismounted.c
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-04-18 22:32:29 -0700
committerRosen Penev <rosenp@gmail.com>2020-04-20 13:21:00 -0700
commitad296391f932764de697dd0bfcfa6f529b69a6cb (patch)
tree745133146f84a52dc1129eea0baeb74950e685c9 /lib/ismounted.c
parent042f62dfc514da177c148c257e4dcb32e5f8379d (diff)
downloadutil-linux-ad296391f932764de697dd0bfcfa6f529b69a6cb.tar.gz
[clang-tidy] fix wrong *cmp usage
Found with bugprone-suspicious-string-compare Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'lib/ismounted.c')
-rw-r--r--lib/ismounted.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ismounted.c b/lib/ismounted.c
index fe4c329a7c..9a20b23673 100644
--- a/lib/ismounted.c
+++ b/lib/ismounted.c
@@ -272,7 +272,7 @@ static int is_swap_device(const char *file)
/* Skip the first line */
if (!fgets(buf, sizeof(buf), f))
goto leave;
- if (*buf && strncmp(buf, "Filename\t", 9))
+ if (*buf && strncmp(buf, "Filename\t", 9) != 0)
/* Linux <=2.6.19 contained a bug in the /proc/swaps
* code where the header would not be displayed
*/