ovs-ofctl: Avoid impossible check for !osm in fetch_port_by_stats().
[openvswitch] / utilities / ovs-ofctl.c
index c1fce83cf181865ea591319c39cbf0847bf50eb3..92808d943e5ad09e009135755a1928c32ac412d1 100644 (file)
@@ -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