test: remove a superfluous string-is-null check

A few lines above we check path_rel[0], so any null pointer will blow up
before we get here.

Found by coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
master
Peter Hutterer 2019-11-05 13:33:11 +10:00 committed by Ran Benita
parent 96ef14ac94
commit 31e561fca9
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ test_get_path(const char *path_rel)
return strdup(path_rel);
path_len = strlen(srcdir ? srcdir : ".") +
strlen(path_rel ? path_rel : "") + 12;
strlen(path_rel) + 12;
path = malloc(path_len);
if (!path) {
fprintf(stderr, "Failed to allocate path (%d chars) for %s\n",