summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d175129)
raw | patch | inline | side by side (parent: d175129)
author | Michael Haggerty <mhagger@alum.mit.edu> | |
Fri, 12 Aug 2011 21:43:08 +0000 (23:43 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 14 Aug 2011 22:02:00 +0000 (15:02 -0700) |
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
attr.c | patch | blob | history |
index f23f62a6b13239e19284e207f2e8ec87431048dd..a7d1aa95d215b2259afeecbbe20506921d33fd6d 100644 (file)
--- a/attr.c
+++ b/attr.c
{
int namelen;
int num_attr;
- const char *cp, *name;
+ const char *cp, *name, *states;
struct match_attr *res = NULL;
int pass;
int is_macro;
else
is_macro = 0;
+ states = name + namelen;
+ states += strspn(states, blank);
+
for (pass = 0; pass < 2; pass++) {
/* pass 0 counts and allocates, pass 1 fills */
num_attr = 0;
- cp = name + namelen;
- cp = cp + strspn(cp, blank);
+ cp = states;
while (*cp) {
cp = parse_attr(src, lineno, cp,
pass ? &(res->state[num_attr]) : NULL);