From 27a97dffc1e3672d58e397bcf30a04e4e66dde77 Mon Sep 17 00:00:00 2001 From: Jacques Vidrine Date: Tue, 6 Jan 2004 18:32:24 +0000 Subject: [PATCH] Make intentions explicit with additional parenthesis. --- lib/libc/stdio/vfscanf.c | 8 ++++---- 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 41bb822f20af..a6c8d0ec0711 100644 --- a/lib/libc/stdio/vfscanf.c +++ b/lib/libc/stdio/vfscanf.c @@ -1004,7 +1004,7 @@ parsefloat(FILE *fp, char *buf, char *end) 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 @@ parsefloat(FILE *fp, char *buf, char *end) 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 4d0281056874..3cb6adcff99a 100644 --- a/lib/libc/stdio/vfwscanf.c +++ b/lib/libc/stdio/vfwscanf.c @@ -816,7 +816,7 @@ parsefloat(FILE *fp, wchar_t *buf, wchar_t *end) 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 @@ parsefloat(FILE *fp, wchar_t *buf, wchar_t *end) 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