tweaks: remove two superfluous conditions

The 'ptr' variable can never be NULL in those places -- whenever it
becomes NULL, the routine returns immediately.
master
Benno Schulenberg 2020-03-03 12:05:43 +01:00
parent 0e59c12af4
commit 3357712928
1 changed files with 2 additions and 2 deletions

View File

@ -1049,7 +1049,7 @@ void parse_rule(char *ptr, int rex_flags)
return;
}
while (ptr != NULL && *ptr != '\0') {
while (*ptr != '\0') {
colortype *newcolor = NULL;
/* Container for a regex (or regex pair) and the color it paints. */
bool goodstart;
@ -1102,7 +1102,7 @@ void parse_rule(char *ptr, int rex_flags)
if (!expectend)
continue;
if (ptr == NULL || strncmp(ptr, "end=", 4) != 0) {
if (strncmp(ptr, "end=", 4) != 0) {
jot_error(N_("\"start=\" requires a corresponding \"end=\""));
return;
}