lock_file: make function-local locks non-static
[gitweb.git] / shallow.c
index df4d44ea7a34a6d6bef119d1494f1c055614cbb1..85313619eac17843513156c911d6b4207e1457fe 100644 (file)
--- a/shallow.c
+++ b/shallow.c
@@ -353,7 +353,7 @@ void advertise_shallow_grafts(int fd)
  */
 void prune_shallow(int show_only)
 {
-       static struct lock_file shallow_lock;
+       struct lock_file shallow_lock = LOCK_INIT;
        struct strbuf sb = STRBUF_INIT;
        int fd;