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: Andy Zhou <azhou@nicira.com>
if(!strcmp(value, "all")) {
gm->group_id = OFPG_ALL;
} else {
- char *error = str_to_u32(value, &gm->group_id);
+ error = str_to_u32(value, &gm->group_id);
if (error) {
goto out;
}
AT_CHECK([STRIP_XIDS stdout], [0], [dnl
OFPST_GROUP_DESC reply (OF1.1):
])
+
+# Negative test.
+AT_CHECK([ovs-ofctl -O OpenFlow11 -vwarn del-groups br0 group_id=0xfffffff0],
+ [1], [], [ovs-ofctl: invalid group id 4294967280
+])
OVS_VSWITCHD_STOP
AT_CLEANUP