=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/cvs.c,v retrieving revision 1.137 retrieving revision 1.138 diff -u -r1.137 -r1.138 --- src/usr.bin/cvs/cvs.c 2007/09/19 13:36:32 1.137 +++ src/usr.bin/cvs/cvs.c 2007/09/19 13:49:55 1.138 @@ -1,4 +1,4 @@ -/* $OpenBSD: cvs.c,v 1.137 2007/09/19 13:36:32 tobias Exp $ */ +/* $OpenBSD: cvs.c,v 1.138 2007/09/19 13:49:55 tobias Exp $ */ /* * Copyright (c) 2006, 2007 Joris Vink * Copyright (c) 2004 Jean-Francois Brousseau @@ -450,8 +450,7 @@ pos = strcspn(p, " \t"); if (pos == strlen(p)) { - /* ignore lines with no arguments */ - continue; + lp = NULL; } else { lp = p + pos; *lp = '\0'; @@ -464,11 +463,12 @@ * getopt() does not like starting at index 0 for * argument processing. */ - *lp = ' '; - cvs_defargs = xstrdup(p); + if (lp != NULL) { + *lp = ' '; + cvs_defargs = xstrdup(p); + } cvs_parsed = 1; } else { - lp++; tcmdp = cvs_findcmd(p); if (tcmdp == NULL && verbosity == 2) cvs_log(LP_NOTICE, @@ -478,7 +478,10 @@ if (tcmdp != cmdp || cmd_parsed) continue; - cmdp->cmd_defargs = xstrdup(lp); + if (lp != NULL) { + lp++; + cmdp->cmd_defargs = xstrdup(lp); + } cmd_parsed = 1; } }