From: Ran Benita Date: Sat, 28 Dec 2019 11:40:38 +0000 (+0200) Subject: test/common: avoid double // in path X-Git-Tag: xkbcommon-0.10.0~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe417d841e838adfd57f591ea27bd34a999eeb77;p=platform%2Fupstream%2Flibxkbcommon.git test/common: avoid double // in path Signed-off-by: Ran Benita --- diff --git a/test/common.c b/test/common.c index e397e12..1a56521 100644 --- a/test/common.c +++ b/test/common.c @@ -171,7 +171,8 @@ test_get_path(const char *path_rel) if (path_rel[0] == '/') return strdup(path_rel); - ret = asprintf(&path, "%s/test/data/%s", srcdir, path_rel); + ret = asprintf(&path, "%s/test/data%s%s", srcdir, + path_rel[0] ? "/" : "", path_rel); if (ret < 0) { fprintf(stderr, "Failed to allocate path for %s\n", path_rel); return NULL;