aboutsummaryrefslogtreecommitdiff
path: root/init-db.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org.(none)>2005-04-19 13:59:17 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org.(none)>2005-04-19 13:59:17 -0700
commit7fa6b4e7692926d2d07adee1ef8e277157929058 (patch)
tree83757dc3185ab31cf3e12c0a67ec191c47e0a478 /init-db.c
parent8ccfbf3279b07028035aeb58baed5c4a79b63567 (diff)
downloadgit-7fa6b4e7692926d2d07adee1ef8e277157929058.tar.gz
git-7fa6b4e7692926d2d07adee1ef8e277157929058.tar.xz
Fix init-db shared database case
Noted by Aaron Straus
Diffstat (limited to 'init-db.c')
-rw-r--r--init-db.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/init-db.c b/init-db.c
index ff2b11a3b..65898fa58 100644
--- a/init-db.c
+++ b/init-db.c
@@ -24,7 +24,7 @@ int main(int argc, char **argv)
sha1_dir = getenv(DB_ENVIRONMENT);
if (sha1_dir) {
struct stat st;
- if (!stat(sha1_dir, &st) < 0 && S_ISDIR(st.st_mode))
+ if (!stat(sha1_dir, &st) && S_ISDIR(st.st_mode))
return 0;
fprintf(stderr, "DB_ENVIRONMENT set to bad directory %s: ", sha1_dir);
}