projects
/
platform
/
upstream
/
libxkbcommon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96ef14a
)
test: remove a superfluous string-is-null check
author
Peter Hutterer
<peter.hutterer@who-t.net>
Tue, 5 Nov 2019 03:33:11 +0000
(13:33 +1000)
committer
Ran Benita
<ran234@gmail.com>
Thu, 7 Nov 2019 09:10:00 +0000
(11:10 +0200)
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>
test/common.c
patch
|
blob
|
history
diff --git
a/test/common.c
b/test/common.c
index
fbe72a7
..
f989818
100644
(file)
--- 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",