mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-03 17:54:33 +03:00
remove erroneous parameter check to nsoption_snoptionf
The API check and bounds check for option indexes was from an unsigned enum so checking for negative numbers was causing "comparison is always false" errors in compilation.
This commit is contained in:
parent
40ae120360
commit
c0f4bbb308
@ -615,8 +615,6 @@ END_TEST
|
||||
START_TEST(nsoption_api_snoptionf_param_test)
|
||||
{
|
||||
int ret;
|
||||
ret = nsoption_snoptionf(NULL, 0, -1, "");
|
||||
ck_assert_int_eq(ret, -1);
|
||||
|
||||
ret = nsoption_snoptionf(NULL, 0, NSOPTION_LISTEND, "");
|
||||
ck_assert_int_eq(ret, -1);
|
||||
|
@ -826,7 +826,7 @@ nsoption_snoptionf(char *string,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((option_idx < 0) || (option_idx >= NSOPTION_LISTEND)) {
|
||||
if (option_idx >= NSOPTION_LISTEND) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user