diff options
author | billf <billf@FreeBSD.org> | 1999-12-12 02:29:54 +0000 |
---|---|---|
committer | billf <billf@FreeBSD.org> | 1999-12-12 02:29:54 +0000 |
commit | 7c2cd0059f46396427902ef62f11257e86fee985 (patch) | |
tree | 1d06515419a7db76cb364681df2930514d396607 /games | |
parent | 1698a08e9a67d82f9a1b778dda598e34ff59c19b (diff) | |
download | FreeBSD-src-7c2cd0059f46396427902ef62f11257e86fee985.zip FreeBSD-src-7c2cd0059f46396427902ef62f11257e86fee985.tar.gz |
-Wall cleanup.
Diffstat (limited to 'games')
-rw-r--r-- | games/quiz/quiz.c | 9 | ||||
-rw-r--r-- | games/quiz/rxp.c | 1 |
2 files changed, 6 insertions, 4 deletions
diff --git a/games/quiz/quiz.c b/games/quiz/quiz.c index 9c4f00f..1c26272 100644 --- a/games/quiz/quiz.c +++ b/games/quiz/quiz.c @@ -171,7 +171,7 @@ show_index() for (s = next_cat(qp->q_text); s; s = next_cat(s)) { if (!rxp_compile(s)) err("%s", rxperr); - if (p = rxp_expand()) + if ((p = rxp_expand()) != '\0') (void)fprintf(pf, "%s ", p); } (void)fprintf(pf, "\n"); @@ -321,12 +321,13 @@ appdstr(s, tp, len) size_t len; { char *mp, *sp; - int ch; char *m; if ((m = malloc(strlen(s) + len + 1)) == NULL) err("%s", strerror(errno)); - for (mp = m, sp = s; *mp++ = *sp++;); + mp = m; + sp = s; + for (; (*mp++ = *sp++);); mp--; if (*(mp - 1) == '\\') @@ -356,7 +357,7 @@ downcase(p) { int ch; - for (; ch = *p; ++p) + for (; (ch = *p); ++p) if (isascii(ch) && isupper(ch)) *p = tolower(ch); } diff --git a/games/quiz/rxp.c b/games/quiz/rxp.c index 8addbef..69ac7c7 100644 --- a/games/quiz/rxp.c +++ b/games/quiz/rxp.c @@ -212,6 +212,7 @@ rxp__match(s, first, j_succ, j_fail, sp_fail) Rxp_t *grp_end; int err; + grp_end = NULL; if (first) { rp = rxpbuf; sp = s; |