Merge branch 'dk/version-gen-gitdir'
[gitweb.git] / compat / mingw.c
index b295e2f6a9faf25927ab6e69ccaf1c2d6a86c420..bb92c436f70790ba907991f3307aa0fe4afdf0f5 100644 (file)
@@ -1677,14 +1677,16 @@ int sigaction(int sig, struct sigaction *in, struct sigaction *out)
 #undef signal
 sig_handler_t mingw_signal(int sig, sig_handler_t handler)
 {
-       sig_handler_t old = timer_fn;
+       sig_handler_t old;
 
        switch (sig) {
        case SIGALRM:
+               old = timer_fn;
                timer_fn = handler;
                break;
 
        case SIGINT:
+               old = sigint_fn;
                sigint_fn = handler;
                break;