aboutsummaryrefslogtreecommitdiff
path: root/gencode.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-07-17 20:34:37 -0700
committerGuy Harris <guy@alum.mit.edu>2018-07-17 20:34:53 -0700
commit6d5a133826806675940f57e472e77fc322bdbb74 (patch)
treef08dc2f54097e32b1a01a2299b33cd6ae3008395 /gencode.h
parent4c12dde4e3b28d597562ebf416508ba3702c7811 (diff)
Don't say "syntax error" twice.
1) yyerror() isn't necessarily called on a syntax error, so rename the routine it calls from bpf_syntax_error() to bpf_parser_error(), and don't have that routine say "syntax error in filter expression", just have it say "can't parse filter expression". 2) If it *is* called on a syntax error, the error message will probably be "syntax error", so you end up saying "syntax error in filter expression: syntax error", which is redundant, so just have it say "can't parse filter expression".
Diffstat (limited to 'gencode.h')
-rw-r--r--gencode.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gencode.h b/gencode.h
index 88def5a8..7c804287 100644
--- a/gencode.h
+++ b/gencode.h
@@ -387,7 +387,7 @@ struct icode {
};
void bpf_optimize(compiler_state_t *, struct icode *ic);
-void PCAP_NORETURN bpf_syntax_error(compiler_state_t *, const char *);
+void PCAP_NORETURN bpf_parser_error(compiler_state_t *, const char *);
void PCAP_NORETURN bpf_error(compiler_state_t *, const char *, ...)
PCAP_PRINTFLIKE(2, 3);