diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2007-03-20 03:56:14 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2007-03-20 03:56:14 +0000 |
commit | 5efa0f0e0b4cfb776c527aae961a39413b8bd001 (patch) | |
tree | 391fd7381dadfa7dea2ac39aab3bdfdc11f42339 /usr.bin/vi/ex | |
parent | 9811dd20491d71b86c6029003d05fb8022093320 (diff) |
remove some bogus *p tests from charles longeau
ok deraadt millert
Diffstat (limited to 'usr.bin/vi/ex')
-rw-r--r-- | usr.bin/vi/ex/ex_cscope.c | 6 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_write.c | 8 |
2 files changed, 7 insertions, 7 deletions
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. */ |