diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-07-17 20:34:37 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-07-17 20:34:53 -0700 |
commit | 6d5a133826806675940f57e472e77fc322bdbb74 (patch) | |
tree | f08dc2f54097e32b1a01a2299b33cd6ae3008395 /gencode.h | |
parent | 4c12dde4e3b28d597562ebf416508ba3702c7811 (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.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |