mount_root: fix compilation error for wrong condition
authorChristian Marangi <ansuelsmth@gmail.com>
Mon, 15 Jan 2024 16:28:07 +0000 (17:28 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Mon, 15 Jan 2024 16:28:07 +0000 (17:28 +0100)
While reworking this to new implementation, a broken and old commit
slipped in by mistake.

Fix compilation error for wrong condition.

mount_root.c: In function 'main':
mount_root.c:131:23: error: expected expression before '||' token
  131 |         if (argc < 2) || (!strcmp(argv[1], "start"))
      |                       ^~
mount_root.c: At top level:
mount_root.c:31:1: error: 'start' defined but not used [-Werror=unused-function]
   31 | start(int argc, char *argv[3])
      | ^~~~~
cc1: all warnings being treated as errors

Fixes: 1a5695925ecf ("mount_root: add support for passing args to mount_root start")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
mount_root.c

index e7c398f3d27961c423b91deed4f0b4f2f3278799..c8ffe58753b55b35feed1701ee93e6a6d07b3d47 100644 (file)
@@ -128,7 +128,7 @@ done(int argc, char *argv[1])
 
 int main(int argc, char **argv)
 {
-       if (argc < 2) || (!strcmp(argv[1], "start"))
+       if (argc < 2 || !strcmp(argv[1], "start"))
                return start(argc, argv);
        if (!strcmp(argv[1], "ram"))
                return ramoverlay();