From: Federico Kircheis Date: Thu, 1 Mar 2018 17:57:18 +0000 (+0100) Subject: Reduce variable scope - conn/tunnel.c X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9fee81c65adb32696c606767af8a7f1d33a31bc7;p=neomutt Reduce variable scope - conn/tunnel.c --- diff --git a/conn/tunnel.c b/conn/tunnel.c index 0d89d1321..0ab7e85cb 100644 --- a/conn/tunnel.c +++ b/conn/tunnel.c @@ -69,7 +69,6 @@ static int tunnel_socket_open(struct Connection *conn) int pid; int rc; int pin[2], pout[2]; - int devnull; tunnel = mutt_mem_malloc(sizeof(struct TunnelData)); conn->sockdata = tunnel; @@ -98,7 +97,7 @@ static int tunnel_socket_open(struct Connection *conn) if (pid == 0) { mutt_sig_unblock_system(0); - devnull = open("/dev/null", O_RDWR); + const int devnull = open("/dev/null", O_RDWR); if (devnull < 0 || dup2(pout[0], STDIN_FILENO) < 0 || dup2(pin[1], STDOUT_FILENO) < 0 || dup2(devnull, STDERR_FILENO) < 0) {