libpayload: Fix lookup by label in CMOS layouts

The condition to compare the labels was twisted.

Change-Id: I34a665aa87e2ff0480eda0f249bbbea8a8fe68d8
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: http://review.coreboot.org/1941
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Nico Huber 2012-11-09 18:12:21 +01:00 committed by Patrick Georgi
parent 48e21ec430
commit 0227dec291
1 changed files with 1 additions and 1 deletions

View File

@ -243,7 +243,7 @@ static struct cb_cmos_enums *lookup_cmos_enum_core(struct cb_cmos_option_table *
cmos_enum; cmos_enum;
cmos_enum = next_cmos_enum_of_id(cmos_enum, config_id)) { cmos_enum = next_cmos_enum_of_id(cmos_enum, config_id)) {
if (((value == NULL) || (cmos_enum->value == *value)) && if (((value == NULL) || (cmos_enum->value == *value)) &&
((text == NULL) || (memcmp((const char*)cmos_enum->text, text, len)))) { ((text == NULL) || (memcmp((const char*)cmos_enum->text, text, len) == 0))) {
return cmos_enum; return cmos_enum;
} }
} }