diff options
author | 2007-03-20 03:42:52 +0000 | |
---|---|---|
committer | 2007-03-20 03:42:52 +0000 | |
commit | 46f282f90df8524d71ca6a452d3b07af527e59b2 (patch) | |
tree | ce31478fe39144f8b1569c12b66f43a69e63704a | |
parent | document softraid and bioctl creation of softraid (diff) | |
download | wireguard-openbsd-46f282f90df8524d71ca6a452d3b07af527e59b2.tar.xz wireguard-openbsd-46f282f90df8524d71ca6a452d3b07af527e59b2.zip |
remove some bogus *p from charles longeau
ok deraadt millert
-rw-r--r-- | lib/libusbhid/usage.c | 4 | ||||
-rw-r--r-- | lib/libutil/fmt_scaled.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/libusbhid/usage.c b/lib/libusbhid/usage.c index 10042f7a55b..6dc8718477a 100644 --- a/lib/libusbhid/usage.c +++ b/lib/libusbhid/usage.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usage.c,v 1.11 2006/10/27 15:26:25 deraadt Exp $ */ +/* $OpenBSD: usage.c,v 1.12 2007/03/20 03:42:52 tedu Exp $ */ /* $NetBSD: usage.c,v 1.1 2001/12/28 17:45:27 augustss Exp $ */ /* @@ -93,7 +93,7 @@ hid_start(const char *hidname) break; if (line[0] == '#') continue; - for (p = line; *p && isspace(*p); p++) + for (p = line; isspace(*p); p++) ; if (!*p) continue; diff --git a/lib/libutil/fmt_scaled.c b/lib/libutil/fmt_scaled.c index a48227bf869..134dbfbd733 100644 --- a/lib/libutil/fmt_scaled.c +++ b/lib/libutil/fmt_scaled.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fmt_scaled.c,v 1.8 2005/10/19 18:48:11 deraadt Exp $ */ +/* $OpenBSD: fmt_scaled.c,v 1.9 2007/03/20 03:42:52 tedu Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Ian F. Darwin. All rights reserved. @@ -77,7 +77,7 @@ scan_scaled(char *scaled, long long *result) long long scale_fact = 1, whole = 0, fpart = 0; /* Skip leading whitespace */ - while (*p && isascii(*p) && isspace(*p)) + while (isascii(*p) && isspace(*p)) ++p; /* Then at most one leading + or - */ @@ -104,7 +104,7 @@ scan_scaled(char *scaled, long long *result) * (but note that E for Exa might look like e to some!). * Advance 'p' to end, to get scale factor. */ - for (; *p && isascii(*p) && (isdigit(*p) || *p=='.'); ++p) { + for (; isascii(*p) && (isdigit(*p) || *p=='.'); ++p) { if (*p == '.') { if (fract_digits > 0) { /* oops, more than one '.' */ errno = EINVAL; @@ -151,7 +151,7 @@ scan_scaled(char *scaled, long long *result) *p == tolower(scale_chars[i])) { /* If it ends with alphanumerics after the scale char, bad. */ - if (*(p+1) != '\0' && isalnum(*(p+1))) { + if (isalnum(*(p+1))) { errno = EINVAL; return -1; } |