Code

Fix init-db shared database case
authorLinus Torvalds <torvalds@ppc970.osdl.org.(none)>
Tue, 19 Apr 2005 20:59:17 +0000 (13:59 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org.(none)>
Tue, 19 Apr 2005 20:59:17 +0000 (13:59 -0700)
Noted by Aaron Straus

init-db.c

index ff2b11a3b33ecba970f59bef3ba63dcc29b53855..65898fa582e973b1cb98171cd4494598dd8bc36d 100644 (file)
--- 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);
        }