[prev in list] [next in list] [prev in thread] [next in thread]
List: openvswitch-dev
Subject: [ovs-dev] [PATCH 1/4] ofp-parse: Factor out duplicated code into new functions.
From: jpettit () nicira ! com (Justin Pettit)
Date: 2010-09-29 20:41:05
Message-ID: 7E66012A-987E-4AA2-938E-0D156882C428 () nicira ! com
[Download RAW message or body]
On Sep 23, 2010, at 3:05 PM, Ben Pfaff wrote:
> +
> +/* Parses 'string' as a OFPT_FLOW_MOD with subtype OFPFC_ADD and returns an
"as a" -> "as an"
> + * ofpbuf that contains it. */
> +struct ofpbuf *
> +parse_ofp_add_flow_str(char *string)
> +{
> ...
> + /* parse_ofp_str() will expand and reallocate the data in 'buffer', so we
> + * can't keep pointers to across the parse_ofp_str() call. */
"to" -> "to it"?
> +struct ofpbuf *
> +parse_ofp_add_flow_file(FILE *stream)
> +{
> ...
> + if (!ds_get_line(&s, stream)) {
> + break;
> + }
Isn't this the opposite of what you want? I believe ds_get_line() will return 0 if \
there's a string available.
--Justin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic