command: removed range check from check_bool()
check_bool() accepts only "0" or "1". The range check is superfluous.
This commit is contained in:
@@ -192,12 +192,6 @@ check_bool(struct client *client, bool *value_r, const char *s)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value > UINT_MAX) {
|
|
||||||
command_error(client, ACK_ERROR_ARG,
|
|
||||||
"Number too large: %s", s);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
*value_r = !!value;
|
*value_r = !!value;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user