summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--attr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/attr.c b/attr.c
index 1fcf042..04d2433 100644
--- a/attr.c
+++ b/attr.c
@@ -402,8 +402,8 @@ static struct attr_stack *read_attr_from_index(const char *path, int macro_ok)
for (sp = buf; *sp; ) {
char *ep;
int more;
- for (ep = sp; *ep && *ep != '\n'; ep++)
- ;
+
+ ep = strchrnul(sp, '\n');
more = (*ep == '\n');
*ep = '\0';
handle_attr_line(res, sp, path, ++lineno, macro_ok);