diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2011-08-12 23:43:09 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-14 15:02:00 -0700 |
commit | e0a5f9aaae4eea67f513e382d9d917388313d2a6 (patch) | |
tree | 46ddbde7a07632b67d1655c4dad263855cf8ada0 /attr.c | |
parent | 85c4a0d0482525480de4b575445ef8721858eff7 (diff) | |
download | git-e0a5f9aaae4eea67f513e382d9d917388313d2a6.tar.gz |
Change while loop into for loop
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'attr.c')
-rw-r--r-- | attr.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -228,14 +228,11 @@ static struct match_attr *parse_attr_line(const char *line, const char *src, for (pass = 0; pass < 2; pass++) { /* pass 0 counts and allocates, pass 1 fills */ - num_attr = 0; - cp = states; - while (*cp) { + for (cp = states, num_attr = 0; *cp; num_attr++) { cp = parse_attr(src, lineno, cp, pass ? &(res->state[num_attr]) : NULL); if (!cp) return NULL; - num_attr++; } if (pass) break; |