From 1519b01c7b53d13915385be33208a7b490791244 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 25 Jan 2012 11:38:15 +0000 Subject: [PATCH] -fixfix --- src/dns/gnunet-helper-dns.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dns/gnunet-helper-dns.c b/src/dns/gnunet-helper-dns.c index 0f19b4a56..5e603ceb8 100644 --- a/src/dns/gnunet-helper-dns.c +++ b/src/dns/gnunet-helper-dns.c @@ -468,7 +468,7 @@ run (int fd_tun) unsigned char bufin[MAX_SIZE]; ssize_t bufin_size = 0; size_t bufin_rpos = 0; - unsigned char *bufin_read; + unsigned char *bufin_read = NULL; fd_set fds_w; fd_set fds_r; int max; @@ -477,7 +477,6 @@ run (int fd_tun) { FD_ZERO (&fds_w); FD_ZERO (&fds_r); - bufin_read = NULL; /* * We are supposed to read and the buffer is empty @@ -578,6 +577,7 @@ run (int fd_tun) bufin_size = read (0, bufin + bufin_rpos, MAX_SIZE - bufin_rpos); if (-1 == bufin_size) { + bufin_read = NULL; if ( (errno == EINTR) || (errno == EAGAIN) ) continue; @@ -586,6 +586,7 @@ run (int fd_tun) } if (0 == bufin_size) { + bufin_read = NULL; fprintf (stderr, "EOF on stdin\n"); return; } -- 2.25.1