ofproto: Initialise return value of modify_flows__
authorSimon Horman <horms@verge.net.au>
Fri, 13 Jun 2014 02:06:09 +0000 (11:06 +0900)
committerBen Pfaff <blp@nicira.com>
Fri, 13 Jun 2014 17:44:36 +0000 (10:44 -0700)
commitcb220b393ab5c60f0552029a9a642a0813069e50
treee7b7f7ff1a64d8a729b4dcf29fb87832944c0f90
parent9a621f8274178f18d1ab8be7bc7db661c1f70104
ofproto: Initialise return value of modify_flows__

dd51dae29bccca3 ("ofproto: Move logic for collecting read-only rules into
rule_criteria.") modifies modify_flows__ such that the variable error,
the return value, may be uninitialised if either of the following is true:

1. ofproto->ofproto_class->rule_premodify_actions is NULL
2. rules->n is zero

It appears for the "bfd - Verify tunnel down detection" test
in the testsuite the first condition is true and the test fails.

This commit fixes the problem.

Signed-off-by: Simon Horman <horms@verge.net.au>
[blp@nicira.com changed the style of the fix]
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto.c