On Mon, Mar 26, 2012 at 02:46:19PM -0700, Reid Price wrote:
> On Mon, Mar 26, 2012 at 1:59 PM, Ben Pfaff <[email protected]> wrote:
>
> > From: Simon Horman <[email protected]>
> > @@ -254,12 +304,17 @@ static enum ofperr
> > %s_decode(uint16_t type, uint16_t code)
> > {
> > switch ((type << 16) | code) {""" % name
> > + found = []
> >
>
> found = set() might be more appropriate here, won't matter.
Thanks, Reid, I applied:
diff --git a/build-aux/extract-ofp-errors b/build-aux/extract-ofp-errors
index 7054408..efaf103 100755
--- a/build-aux/extract-ofp-errors
+++ b/build-aux/extract-ofp-errors
@@ -304,7 +304,7 @@ static enum ofperr
%s_decode(uint16_t type, uint16_t code)
{
switch ((type << 16) | code) {""" % name
- found = []
+ found = set()
for enum in names:
if enum not in map:
continue
@@ -314,7 +314,7 @@ static enum ofperr
value = (type_ << 16) | code
if value in found:
continue
- found.append(value)
+ found.add(value)
print " case (%d << 16) | %d:" % (type_, code)
print " return OFPERR_%s;" % enum
print """\
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev