2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

ofp-parse: Properly report error for invalid bucket ID.

The inner 'error' shadowed an outer one, so that the error, when set, was
never returned to the caller.

Found by LLVM scan-build.

Reported-by: Kevin Lo <kevlo@FreeBSD.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
This commit is contained in:
Ben Pfaff
2015-04-16 13:40:04 -07:00
parent 8790a8b4ef
commit 908995c56f
2 changed files with 6 additions and 1 deletions

View File

@@ -1333,7 +1333,7 @@ parse_ofp_group_mod_str__(struct ofputil_group_mod *gm, uint16_t command,
} else if (!strcmp(value, "last")) {
gm->command_bucket_id = OFPG15_BUCKET_LAST;
} else {
char *error = str_to_u32(value, &gm->command_bucket_id);
error = str_to_u32(value, &gm->command_bucket_id);
if (error) {
goto out;
}