mirror of
https://github.com/troglobit/finit.git
synced 2026-11-28 20:58:24 +00:00
Fix obvious bug in ismnt() found by Coverity Scan
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
9167d9255d
commit
621da582c2
1 file changed
+5
-3
+5
-3
@@ -563,10 +563,12 @@ int ismnt(char *file, char *dir, char *mode)
|
|||||||
|
|
||||||
while ((mnt = getmntent(fp))) {
|
while ((mnt = getmntent(fp))) {
|
||||||
if (!strcmp(mnt->mnt_dir, dir)) {
|
if (!strcmp(mnt->mnt_dir, dir)) {
|
||||||
if (mode && hasopt(mnt->mnt_opts, mode))
|
if (mode) {
|
||||||
found = 1;
|
if (hasopt(mnt->mnt_opts, mode))
|
||||||
else
|
found = 1;
|
||||||
|
} else
|
||||||
found = 1;
|
found = 1;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user