unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] cli: fix notmuch top level argument parsing
@ 2012-12-03 20:56 Jani Nikula
  2012-12-03 20:56 ` [PATCH 2/2] cli: convert "notmuch new" to the argument parser Jani Nikula
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jani Nikula @ 2012-12-03 20:56 UTC (permalink / raw)
  To: notmuch

Use strcmp instead of STRNCMP_LITERAL, which matches the prefix
instead of the whole argument.
---
 notmuch.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/notmuch.c b/notmuch.c
index 477a09c..4ff66e3 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;
     }
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-12-04 14:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-03 20:56 [PATCH 1/2] cli: fix notmuch top level argument parsing Jani Nikula
2012-12-03 20:56 ` [PATCH 2/2] cli: convert "notmuch new" to the argument parser Jani Nikula
2012-12-03 22:28   ` Austin Clements
2012-12-03 22:35     ` Jani Nikula
2012-12-03 21:32 ` [PATCH 1/2] cli: fix notmuch top level argument parsing Michal Nazarewicz
2012-12-03 22:17   ` Jani Nikula
2012-12-03 22:30     ` Jani Nikula
2012-12-04 14:00       ` Michal Nazarewicz
2012-12-04 13:16 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).