commit 9995649367b583855c106ac53a1992b507b58d18 parent 1009bd4441675e1e50534c11e2e72f687a8ba902 Author: Roberto E. Vargas Caballero <k0ga@shike2.com> Date: Tue, 12 Dec 2017 16:40:27 +0000 [as] Simplify the trailing character detection We don't need a full check of the trailing line now, because we only accept comments at the beginning of the line. Diffstat:
M | as/parser.c | | | 8 | ++------ |
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/as/parser.c b/as/parser.c @@ -112,12 +112,8 @@ extract(char *s, size_t len, struct line *lp) if (lp->args = field(&s, &len)) r++; - if (s) { - while (isspace(*s)) - ++s; - if (*s != '\0' && *s != '/') - error("trailing characters at the end of the line"); - } + if (s && *s && *s != '/') + error("trailing characters at the end of the line"); return r; }