From: Christian Marangi Date: Mon, 15 Jan 2024 16:28:07 +0000 (+0100) Subject: mount_root: fix compilation error for wrong condition X-Git-Url: http://git.openwrt.org/?p=project%2Ffstools.git;a=commitdiff_plain;h=325d63d67006c5526ab9b0fbc62329da48aa93af mount_root: fix compilation error for wrong condition 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 --- diff --git a/mount_root.c b/mount_root.c index e7c398f..c8ffe58 100644 --- a/mount_root.c +++ b/mount_root.c @@ -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();