]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - disk-utils/fsck.c
wipefs: add --lock and LOCK_BLOCK_DEVICE
[thirdparty/util-linux.git] / disk-utils / fsck.c
index a071c0eb498690fc9cb7747ea41eb56ad1ca13fb..fda80a6fe85be0c6fe3e8ec9f7ddb1cf8d5ca754 100644 (file)
@@ -172,8 +172,8 @@ static int string_to_int(const char *s)
        l = strtol(s, &p, 0);
        if (*p || l == LONG_MIN || l == LONG_MAX || l < 0 || l > INT_MAX)
                return -1;
-       else
-               return (int) l;
+
+       return (int) l;
 }
 
 /* Do we really really want to check this fs? */
@@ -819,10 +819,10 @@ static struct fsck_instance *wait_one(int flags)
                for (inst2 = instance_list; inst2; inst2 = inst2->next) {
                        if (inst2->flags & FLAG_DONE)
                                continue;
-                       if (strcmp(inst2->type, "ext2") &&
+                       if (strcmp(inst2->type, "ext2") != 0 &&
                            strcmp(inst2->type, "ext3") &&
-                           strcmp(inst2->type, "ext4") &&
-                           strcmp(inst2->type, "ext4dev"))
+                           strcmp(inst2->type, "ext4") != 0 &&
+                           strcmp(inst2->type, "ext4dev") != 0)
                                continue;
                        /*
                         * If we've just started the fsck, wait a tiny
@@ -903,8 +903,8 @@ static int fsck_device(struct libmnt_fs *fs, int interactive)
 
        if (type && strcmp(type, "auto") != 0)
                ;
-       else if (fstype && strncmp(fstype, "no", 2) &&
-           strncmp(fstype, "opts=", 5) && strncmp(fstype, "loop", 4) &&
+       else if (fstype && strncmp(fstype, "no", 2) != 0 &&
+           strncmp(fstype, "opts=", 5) != 0 && strncmp(fstype, "loop", 4) != 0 &&
            !strchr(fstype, ','))
                type = fstype;
        else