diff options
author | nectar <nectar@FreeBSD.org> | 2004-01-06 18:32:24 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2004-01-06 18:32:24 +0000 |
commit | a455b2e93e7dadc05f627dc75887505b3fd011e4 (patch) | |
tree | 2d82a6fb48b89408ba584d81683a17b32993d497 /lib/libc | |
parent | c281d0e2eafa39c917ef047ce514a5594c54b94f (diff) | |
download | FreeBSD-src-a455b2e93e7dadc05f627dc75887505b3fd011e4.zip FreeBSD-src-a455b2e93e7dadc05f627dc75887505b3fd011e4.tar.gz |
Make intentions explicit with additional parenthesis.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdio/vfscanf.c | 8 | ||||
-rw-r--r-- | lib/libc/stdio/vfwscanf.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c index 41bb822..a6c8d0e 100644 --- a/lib/libc/stdio/vfscanf.c +++ b/lib/libc/stdio/vfscanf.c @@ -1004,7 +1004,7 @@ reswitch: goto reswitch; } case S_DIGITS: - if (ishex && isxdigit(c) || isdigit(c)) + if ((ishex && isxdigit(c)) || isdigit(c)) gotmantdig = 1; else { state = S_FRAC; @@ -1015,13 +1015,13 @@ reswitch: commit = p; break; case S_FRAC: - if ((c == 'E' || c == 'e') && !ishex || - (c == 'P' || c == 'p') && ishex) { + if (((c == 'E' || c == 'e') && !ishex) || + ((c == 'P' || c == 'p') && ishex)) { if (!gotmantdig) goto parsedone; else state = S_EXP; - } else if (ishex && isxdigit(c) || isdigit(c)) { + } else if ((ishex && isxdigit(c)) || isdigit(c)) { commit = p; gotmantdig = 1; } else diff --git a/lib/libc/stdio/vfwscanf.c b/lib/libc/stdio/vfwscanf.c index 4d02810..3cb6adc 100644 --- a/lib/libc/stdio/vfwscanf.c +++ b/lib/libc/stdio/vfwscanf.c @@ -816,7 +816,7 @@ reswitch: goto reswitch; } case S_DIGITS: - if (ishex && iswxdigit(c) || iswdigit(c)) + if ((ishex && iswxdigit(c)) || iswdigit(c)) gotmantdig = 1; else { state = S_FRAC; @@ -827,13 +827,13 @@ reswitch: commit = p; break; case S_FRAC: - if ((c == 'E' || c == 'e') && !ishex || - (c == 'P' || c == 'p') && ishex) { + if (((c == 'E' || c == 'e') && !ishex) || + ((c == 'P' || c == 'p') && ishex)) { if (!gotmantdig) goto parsedone; else state = S_EXP; - } else if (ishex && iswxdigit(c) || iswdigit(c)) { + } else if ((ishex && iswxdigit(c)) || iswdigit(c)) { commit = p; gotmantdig = 1; } else |