summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index 3184a3abd..bc95d2dc8 100644
--- a/src/util.c
+++ b/src/util.c
@@ -67,7 +67,7 @@ int git__dirname(char *dir, size_t n, char *path)
assert(dir && n > 1);
- if (!path || !*path || !(s = strrchr(path, '/'))) {
+ if (!path || !*path || (s = strrchr(path, '/')) == NULL) {
strcpy(dir, ".");
return 1;
}
@@ -99,7 +99,7 @@ int git__basename(char *base, size_t n, char *path)
}
len = strlen(path);
- if (!(s = strrchr(path, '/'))) {
+ if ((s = strrchr(path, '/')) == NULL) {
if (len >= n)
return GIT_ERROR;
strcpy(base, path);