summaryrefslogtreecommitdiff
path: root/test/common.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2019-11-05 13:33:11 +1000
committerRan Benita <ran234@gmail.com>2019-11-07 11:10:00 +0200
commit31e561fca9f2d6c9a0d0cc771d2bf77e6131ecdf (patch)
tree2ae562b149443f091c81aa471cc9981667e18143 /test/common.c
parent96ef14ac949ba56bdf1358b65c5a95e48611f45e (diff)
downloadxorg-lib-libxkbcommon-31e561fca9f2d6c9a0d0cc771d2bf77e6131ecdf.tar.gz
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>
Diffstat (limited to 'test/common.c')
-rw-r--r--test/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/common.c b/test/common.c
index fbe72a7..f989818 100644
--- a/test/common.c
+++ b/test/common.c
@@ -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",