Remove redundant NULL check
copy has been used before this point - so it is too late to be concerned about a NULL pointer now. This is OK as sstrdup() calls err() on NULL return from the underlying strdup() call. Raised by cppcheck.
This commit is contained in:
parent
dfe89cc4f1
commit
88c378154a
|
@ -44,10 +44,7 @@ int mkdirp(const char *path, mode_t mode) {
|
|||
|
||||
char *sep = strrchr(copy, '/');
|
||||
if (sep == NULL) {
|
||||
if (copy != NULL) {
|
||||
free(copy);
|
||||
copy = NULL;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
*sep = '\0';
|
||||
|
|
Loading…
Reference in New Issue