Commit 88e7c7af authored by Sebastian Ramacher's avatar Sebastian Ramacher

Simplify

parent 76bc4638
......@@ -122,20 +122,15 @@ cmd_marks_add(girara_session_t* session, girara_list_t* argument_list)
return false;
}
char* key_string = girara_list_nth(argument_list, 0);
const char* key_string = girara_list_nth(argument_list, 0);
if (key_string == NULL) {
return false;
}
if (strlen(key_string) != 1) {
if (key_string == NULL || strlen(key_string) != 1) {
return false;
}
char key = key_string[0];
if (((key >= 0x41 && key <= 0x5A) || (key >=
0x61 && key <= 0x7A)) == false) {
const char key = key_string[0];
if (((key >= 0x41 && key <= 0x5A) ||
(key >= 0x61 && key <= 0x7A)) == false) {
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment