From: Patrick McHardy Date: Tue, 4 Feb 2014 08:09:27 +0000 (+0000) Subject: erec: skip includes with INDESC_INTERNAL X-Git-Tag: v0.2~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9194645cc1b7a07a1e90a394b025d9859f97064;p=thirdparty%2Fnftables.git erec: skip includes with INDESC_INTERNAL Don't display "In file included from internal:0:0-0:" for errors occuring in a parsed file. Signed-off-by: Patrick McHardy --- diff --git a/src/erec.c b/src/erec.c index a157d2fa..4930085f 100644 --- a/src/erec.c +++ b/src/erec.c @@ -114,7 +114,9 @@ void erec_print(FILE *f, const struct error_record *erec) if (indesc->location.indesc != NULL) { const char *prefix = "In file included from"; iloc = &indesc->location; - for (tmp = iloc->indesc; tmp != NULL; tmp = iloc->indesc) { + for (tmp = iloc->indesc; + tmp != NULL && tmp->type != INDESC_INTERNAL; + tmp = iloc->indesc) { fprintf(f, "%s %s:%u:%u-%u:\n", prefix, tmp->name, iloc->first_line, iloc->first_column,