ofproto: Make ofproto_enumerate_types() match its comment.
authorBen Pfaff <blp@nicira.com>
Mon, 9 Dec 2013 23:38:25 +0000 (15:38 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 11 Dec 2013 19:08:32 +0000 (11:08 -0800)
The comment says that it clears the passed-in sset, but it didn't.  The bug
didn't actually affect any of the existing callers, which all passed in an
empty sset.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
ofproto/ofproto.c

index 424d2ce..e41d72b 100644 (file)
@@ -432,6 +432,7 @@ ofproto_enumerate_types(struct sset *types)
 {
     size_t i;
 
+    sset_clear(types);
     for (i = 0; i < n_ofproto_classes; i++) {
         ofproto_classes[i]->enumerate_types(types);
     }