summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/ssh/clientloop.c9
-rw-r--r--usr.bin/ssh/readconf.c4
-rw-r--r--usr.bin/systat/cmds.c6
-rw-r--r--usr.bin/systat/disks.c6
-rw-r--r--usr.bin/systat/netcmds.c6
-rw-r--r--usr.bin/tset/termcap.c8
-rw-r--r--usr.bin/vi/common/msg.c4
-rw-r--r--usr.bin/vi/ex/ex_cscope.c6
-rw-r--r--usr.bin/vi/ex/ex_write.c8
-rw-r--r--usr.bin/whatis/whatis.c4
10 files changed, 30 insertions, 31 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c
index 7e91aaf3a69..775cb48b051 100644
--- a/usr.bin/ssh/clientloop.c
+++ b/usr.bin/ssh/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.178 2007/02/20 10:25:14 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.179 2007/03/20 03:56:12 tedu Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -927,7 +927,7 @@ process_cmdline(void)
cmd = s = read_passphrase("\r\nssh> ", RP_ECHO);
if (s == NULL)
goto out;
- while (*s && isspace(*s))
+ while (isspace(*s))
s++;
if (*s == '-')
s++; /* Skip cmdline '-', if any */
@@ -974,9 +974,8 @@ process_cmdline(void)
goto out;
}
- s++;
- while (*s && isspace(*s))
- s++;
+ while (isspace(*++s))
+ ;
if (delete) {
cancel_port = 0;
diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c
index 2c14d5f6cc9..b178388ba36 100644
--- a/usr.bin/ssh/readconf.c
+++ b/usr.bin/ssh/readconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.c,v 1.161 2007/01/21 01:45:35 stevesk Exp $ */
+/* $OpenBSD: readconf.c,v 1.162 2007/03/20 03:56:12 tedu Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1219,7 +1219,7 @@ parse_forward(Forward *fwd, const char *fwdspec)
cp = p = xstrdup(fwdspec);
/* skip leading spaces */
- while (*cp && isspace(*cp))
+ while (isspace(*cp))
cp++;
for (i = 0; i < 4; ++i)
diff --git a/usr.bin/systat/cmds.c b/usr.bin/systat/cmds.c
index aef72aefd73..8e0d12e7afe 100644
--- a/usr.bin/systat/cmds.c
+++ b/usr.bin/systat/cmds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmds.c,v 1.13 2006/03/31 04:10:59 deraadt Exp $ */
+/* $OpenBSD: cmds.c,v 1.14 2007/03/20 03:56:13 tedu Exp $ */
/* $NetBSD: cmds.c,v 1.4 1996/05/10 23:16:32 thorpej Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)cmds.c 8.2 (Berkeley) 4/29/95";
#endif
-static char rcsid[] = "$OpenBSD: cmds.c,v 1.13 2006/03/31 04:10:59 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: cmds.c,v 1.14 2007/03/20 03:56:13 tedu Exp $";
#endif /* not lint */
#include <stdlib.h>
@@ -62,7 +62,7 @@ command(char *cmd)
*cp++ = '\0';
if (*cmd == '\0')
return;
- for (; *cp && isspace(*cp); cp++)
+ for (; isspace(*cp); cp++)
;
if (strcmp(cmd, "quit") == 0 || strcmp(cmd, "q") == 0)
die();
diff --git a/usr.bin/systat/disks.c b/usr.bin/systat/disks.c
index ed540d16e7a..909bb6b85e3 100644
--- a/usr.bin/systat/disks.c
+++ b/usr.bin/systat/disks.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disks.c,v 1.15 2006/03/31 04:10:59 deraadt Exp $ */
+/* $OpenBSD: disks.c,v 1.16 2007/03/20 03:56:13 tedu Exp $ */
/* $NetBSD: disks.c,v 1.4 1996/05/10 23:16:33 thorpej Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)disks.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: disks.c,v 1.15 2006/03/31 04:10:59 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: disks.c,v 1.16 2007/03/20 03:56:13 tedu Exp $";
#endif /* not lint */
#include <string.h>
@@ -78,7 +78,7 @@ dkselect(char *args, int truefalse, int selections[])
if (cp)
*cp = '\0';
for (;;) {
- for (cp = args; *cp && isspace(*cp); cp++)
+ for (cp = args; isspace(*cp); cp++)
;
args = cp;
for (; *cp && !isspace(*cp); cp++)
diff --git a/usr.bin/systat/netcmds.c b/usr.bin/systat/netcmds.c
index e25aff60d86..440038d7921 100644
--- a/usr.bin/systat/netcmds.c
+++ b/usr.bin/systat/netcmds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcmds.c,v 1.16 2006/03/31 04:10:59 deraadt Exp $ */
+/* $OpenBSD: netcmds.c,v 1.17 2007/03/20 03:56:13 tedu Exp $ */
/* $NetBSD: netcmds.c,v 1.4 1995/05/21 17:14:38 mycroft Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)netcmds.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: netcmds.c,v 1.16 2006/03/31 04:10:59 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: netcmds.c,v 1.17 2007/03/20 03:56:13 tedu Exp $";
#endif /* not lint */
/*
@@ -131,7 +131,7 @@ changeitems(char *args, int onoff)
if (cp)
*cp = '\0';
for (;;args = cp) {
- for (cp = args; *cp && isspace(*cp); cp++)
+ for (cp = args; isspace(*cp); cp++)
;
args = cp;
for (; *cp && !isspace(*cp); cp++)
diff --git a/usr.bin/tset/termcap.c b/usr.bin/tset/termcap.c
index eea7eeb653d..3c78cdd369a 100644
--- a/usr.bin/tset/termcap.c
+++ b/usr.bin/tset/termcap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: termcap.c,v 1.5 2003/06/03 02:56:20 millert Exp $ */
+/* $OpenBSD: termcap.c,v 1.6 2007/03/20 03:56:13 tedu Exp $ */
/* $NetBSD: termcap.c,v 1.7 1995/06/05 19:45:52 pk Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: termcap.c,v 1.5 2003/06/03 02:56:20 millert Exp $";
+static char rcsid[] = "$OpenBSD: termcap.c,v 1.6 2007/03/20 03:56:13 tedu Exp $";
#endif /* not lint */
#define PVECSIZ 32 /* max number of names in path */
@@ -175,9 +175,9 @@ wrtermcap(bp)
* empty fields or fields containing only whitespace.
*/
while ((p = strsep(&t, ":")) != NULL) {
- while ((ch = *p) != '\0' && isspace(ch))
+ while (isspace(*p))
++p;
- if (ch == '\0')
+ if (*p == '\0')
continue;
while ((ch = *p++) != '\0')
switch(ch) {
diff --git a/usr.bin/vi/common/msg.c b/usr.bin/vi/common/msg.c
index a1a9827ad9d..61d5efefa62 100644
--- a/usr.bin/vi/common/msg.c
+++ b/usr.bin/vi/common/msg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msg.c,v 1.16 2006/03/11 06:58:00 ray Exp $ */
+/* $OpenBSD: msg.c,v 1.17 2007/03/20 03:56:13 tedu Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -202,7 +202,7 @@ retry: FREE_SPACE(sp, bp, blen);
++p;
continue;
}
- for (u = p; *++p != '\0' && isdigit(*p););
+ for (u = p; isdigit(*++p););
if (*p != '$')
continue;
diff --git a/usr.bin/vi/ex/ex_cscope.c b/usr.bin/vi/ex/ex_cscope.c
index b6344c3846f..7bd12194599 100644
--- a/usr.bin/vi/ex/ex_cscope.c
+++ b/usr.bin/vi/ex/ex_cscope.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_cscope.c,v 1.12 2006/01/08 21:05:40 miod Exp $ */
+/* $OpenBSD: ex_cscope.c,v 1.13 2007/03/20 03:56:13 tedu Exp $ */
/*-
* Copyright (c) 1994, 1996
@@ -137,7 +137,7 @@ ex_cscope(sp, cmdp)
break;
if (*p != '\0') {
*p++ = '\0';
- for (; *p && isspace(*p); ++p);
+ for (; isspace(*p); ++p);
}
if ((ccp = lookup_ccmd(cmd)) == NULL) {
@@ -613,7 +613,7 @@ create_cs_cmd(sp, pattern, searchp)
}
/* Skip <blank> characters to the pattern. */
- for (p = pattern + 1; *p != '\0' && isblank(*p); ++p);
+ for (p = pattern + 1; isblank(*p); ++p);
if (*p == '\0') {
usage: (void)csc_help(sp, "find");
return (NULL);
diff --git a/usr.bin/vi/ex/ex_write.c b/usr.bin/vi/ex/ex_write.c
index 9ab12e14306..894583284ac 100644
--- a/usr.bin/vi/ex/ex_write.c
+++ b/usr.bin/vi/ex/ex_write.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ex_write.c,v 1.9 2006/05/30 19:43:27 pvalchev Exp $ */
+/* $OpenBSD: ex_write.c,v 1.10 2007/03/20 03:56:13 tedu Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -151,7 +151,7 @@ exwr(sp, cmdp, cmd)
/* Skip any leading whitespace. */
if (cmdp->argc != 0)
- for (p = cmdp->argv[0]->bp; *p != '\0' && isblank(*p); ++p)
+ for (p = cmdp->argv[0]->bp; isblank(*p); ++p)
;
/* If "write !" it's a pipe to a utility. */
@@ -163,7 +163,7 @@ exwr(sp, cmdp, cmd)
}
/* Expand the argument. */
- for (++p; *p && isblank(*p); ++p);
+ for (++p; isblank(*p); ++p);
if (*p == '\0') {
ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE);
return (1);
@@ -204,7 +204,7 @@ exwr(sp, cmdp, cmd)
LF_SET(FS_APPEND);
/* Skip ">>" and whitespace. */
- for (p += 2; *p && isblank(*p); ++p);
+ for (p += 2; isblank(*p); ++p);
}
/* If no other arguments, just write the file back. */
diff --git a/usr.bin/whatis/whatis.c b/usr.bin/whatis/whatis.c
index deb977e41cf..f9809c6be70 100644
--- a/usr.bin/whatis/whatis.c
+++ b/usr.bin/whatis/whatis.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: whatis.c,v 1.11 2006/04/02 21:38:56 djm Exp $ */
+/* $OpenBSD: whatis.c,v 1.12 2007/03/20 03:56:13 tedu Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -185,7 +185,7 @@ match(char *bp, char *str)
break;
/* check for word match first */
- for (start = bp++; *bp && (*bp == '_' || isalnum(*bp)); ++bp)
+ for (start = bp++; *bp == '_' || isalnum(*bp); ++bp)
;
if (bp - start == len) {
if (strncasecmp(start, str, len) == 0)