bbf: Update the validate function of boolean parameters

This commit is contained in:
Amin Ben Ramdhane 2022-02-22 16:28:24 +01:00
parent 889c15feeb
commit c7ffc5afd4

View file

@ -1076,9 +1076,7 @@ static char *check_value_by_type(char *value, int type)
}
break;
case DMT_BOOL:
if (dm_validate_boolean(buf))
return "0";
break;
return dmuci_string_to_boolean(buf) ? "1" : "0";
case DMT_HEXBIN:
while (buf[i] != 0) {
if (isxdigit(buf[i]) == 0)