diff options
author | John Ankarström <john@ankarstrom.se> | 2021-07-09 21:58:24 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-07-09 22:01:31 +0200 |
commit | 54bf88a00535d30f084982b69bb3c6121d7ae8ed (patch) | |
tree | dfc8d00c5a7f1885a90d3082651880d39ba5851e | |
parent | da540383a99d13009e66e34bce13804647e264bc (diff) | |
download | build-54bf88a00535d30f084982b69bb3c6121d7ae8ed.tar.gz |
Move definition to for's expression
-rw-r--r-- | build.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -78,8 +78,7 @@ main(int argc, char *argv[]) /* Read line by line, at most twenty. */ for (j = 0; j < 20 && fgets(buf, MAXBUF, fp); j++) { buf[strcspn(buf, "\n")] = 0; - b = buf; - for (; *b; b++) { + for (b = buf; *b; b++) { /* Find command line. */ if (strncmp(b, " $ ", 3) == 0 |