From: Jani Nikula Date: Mon, 3 Dec 2012 20:56:12 +0000 (+0200) Subject: cli: fix notmuch top level argument parsing X-Git-Tag: 0.15_rc1~130 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8ce50f300fd94dc999ea39eef1ac64e466ebdd0e;p=notmuch.git cli: fix notmuch top level argument parsing Use strcmp instead of STRNCMP_LITERAL, which matches the prefix instead of the whole argument. --- diff --git a/notmuch.c b/notmuch.c index 477a09cf..4ff66e30 100644 --- a/notmuch.c +++ b/notmuch.c @@ -245,10 +245,10 @@ main (int argc, char *argv[]) if (argc == 1) return notmuch (local); - if (STRNCMP_LITERAL (argv[1], "--help") == 0) + if (strcmp (argv[1], "--help") == 0) return notmuch_help_command (NULL, argc - 1, &argv[1]); - if (STRNCMP_LITERAL (argv[1], "--version") == 0) { + if (strcmp (argv[1], "--version") == 0) { printf ("notmuch " STRINGIFY(NOTMUCH_VERSION) "\n"); return 0; }