Looks good, thanks. Ethan
On Sun, May 13, 2012 at 4:58 PM, Ben Pfaff <b...@nicira.com> wrote: > At the time of the call to ofpbuf_at(), we know that the ofp_stats_msg is > present because ofputil_decode_msg_type() reported that it was. Therefore, > we can use ofpbuf_at_assert() and don't have to check for a null pointer. > > Found by clang. > > Signed-off-by: Ben Pfaff <b...@nicira.com> > --- > utilities/ovs-ofctl.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c > index c1fce83..92808d9 100644 > --- a/utilities/ovs-ofctl.c > +++ b/utilities/ovs-ofctl.c > @@ -620,8 +620,8 @@ fetch_port_by_stats(const char *vconn_name, > verbosity + 1)); > } > > - osm = ofpbuf_at(reply, 0, sizeof *osm); > - done = !osm || !(ntohs(osm->flags) & OFPSF_REPLY_MORE); > + osm = ofpbuf_at_assert(reply, 0, sizeof *osm); > + done = !(ntohs(osm->flags) & OFPSF_REPLY_MORE); > > if (found) { > /* We've already found the port, but we need to drain > -- > 1.7.2.5 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev