[dev][ii][patch] Allow calling ii without any argument (using defaults)

From: Jean-Philippe Gagné Guay <jeanphilippe150_AT_gmail.com>
Date: Thu, 1 May 2014 02:20:00 -0400

ii could be called without any argument, using the defaults described in the
manpage.

diff --git a/ii.c b/ii.c
index d93266c..0816009 100644
--- a/ii.c
+++ b/ii.c
_AT_@ -466,7 +466,7 @@ int main(int argc, char *argv[]) {
         }
         snprintf(nick, sizeof(nick), "%s", spw->pw_name);
         snprintf(prefix, sizeof(prefix),"%s/irc", spw->pw_dir);
- if (argc <= 1 || (argc == 2 && argv[1][0] == '-' && argv[1][1] == 'h')) usage();
+ if (argc < 1 || (argc == 2 && argv[1][0] == '-' && argv[1][1] == 'h')) usage();
 
         for(i = 1; (i + 1 < argc) && (argv[i][0] == '-'); i++) {
                 switch (argv[i][1]) {
Received on Thu May 01 2014 - 08:20:00 CEST

This archive was generated by hypermail 2.3.0 : Thu May 01 2014 - 08:24:06 CEST