Optimize error text printing

This commit is contained in:
akp 2023-10-06 23:01:40 +01:00
parent 91b17efc5c
commit b9e9411554
No known key found for this signature in database
GPG key ID: CF8D58F3DEB20755

View file

@ -31,8 +31,7 @@ int main(int argc, char* argv[]) {
struct Rule* rule = (struct Rule*) malloc(sizeof(struct Rule));
char* endptr = parse_rule(line, rule);
if (endptr == NULL || *endptr != '\n') {
fprintf(stderr, "Ill formed rule: ");
fprintf(stderr, "%s", line);
fprintf(stderr, "Ill formed rule: %s\n", line);
return 1;
}
parsed_rules[num_parsed_rules] = rule;