diff options
author | Ben Pfaff <blp@nicira.com> | 2013-07-08 10:15:00 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2013-07-08 10:15:00 -0700 |
commit | bdda5aca7b376bcc8c88072d00011a9da04af65c (patch) | |
tree | 1422bc448e2a094e0d1e988d29e7fe30600f13eb /lib/meta-flow.h | |
parent | 5ed2d819bb27cd8d899ed060460c8a28b481cf2f (diff) |
ofp-parse: Do not exit() upon a parse error.
Until now, failure to parse a flow in the ofp-parse module has caused the
program to abort immediately with a fatal error. This makes it hard to
use these functions from any long-lived program. This commit fixes the
problem.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/meta-flow.h')
-rw-r--r-- | lib/meta-flow.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/meta-flow.h b/lib/meta-flow.h index a85a1937..bc402dc0 100644 --- a/lib/meta-flow.h +++ b/lib/meta-flow.h @@ -360,8 +360,10 @@ uint64_t mf_get_subfield(const struct mf_subfield *, const struct flow *); void mf_format_subfield(const struct mf_subfield *, struct ds *); -char *mf_parse_subfield__(struct mf_subfield *sf, const char **s); -const char *mf_parse_subfield(struct mf_subfield *, const char *); +char *mf_parse_subfield__(struct mf_subfield *sf, const char **s) + WARN_UNUSED_RESULT; +char *mf_parse_subfield(struct mf_subfield *, const char *s) + WARN_UNUSED_RESULT; enum ofperr mf_check_src(const struct mf_subfield *, const struct flow *); enum ofperr mf_check_dst(const struct mf_subfield *, const struct flow *); |