mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
dmcommon: Update boolean validator
This commit is contained in:
parent
c924d27338
commit
32f5cb92dd
1 changed files with 1 additions and 1 deletions
|
|
@ -1618,7 +1618,7 @@ int dm_validate_boolean(char *value)
|
|||
{
|
||||
/* check format */
|
||||
if ((value[0] == '1' && value[1] == '\0') || (value[0] == '0' && value[1] == '\0')
|
||||
|| (strcmp(value, "true") == 0) || (strcmp(value, "false") == 0)) {
|
||||
|| !strcasecmp(value, "true") || !strcasecmp(value, "false")) {
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue