Drop unnecessary NULL check
The variable `str` has been already dereferenced in the loop.
check_after_deref: Null-checking str suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
Found by Coverity
@@ -1365,7 +1365,7 @@ parse_format (GLogItem * logitem, char *str, char *lfmt) {
return 0;
if (tilde && *p != '\0') {
- if ((str == NULL) || (*str == '\0'))
+ if (*str == '\0')
return 0;
if (special_specifier (logitem, &str, &p) == 1)
return 1;
@@ -1373,7 +1373,7 @@ parse_format (GLogItem * logitem, char *str, char *lfmt) {
}
/* %h */
else if (perc && *p != '\0') {
- if ((str == NULL) || (*str == '\0'))
+ if (*str == '\0')
return 0;
memset (end, 0, sizeof end);
