diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-25 11:38:15 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-25 11:38:15 +0000 |
commit | 1519b01c7b53d13915385be33208a7b490791244 (patch) | |
tree | ee0c9746bc848892c4c2e491014947e38d7fd74a /src/dns/gnunet-helper-dns.c | |
parent | 3fa20947600d197a73b74e832f4d8e9fdc9f6103 (diff) | |
download | gnunet-1519b01c7b53d13915385be33208a7b490791244.tar.gz gnunet-1519b01c7b53d13915385be33208a7b490791244.zip |
-fixfix
Diffstat (limited to 'src/dns/gnunet-helper-dns.c')
-rw-r--r-- | src/dns/gnunet-helper-dns.c | 5 |
1 files 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) | |||
468 | unsigned char bufin[MAX_SIZE]; | 468 | unsigned char bufin[MAX_SIZE]; |
469 | ssize_t bufin_size = 0; | 469 | ssize_t bufin_size = 0; |
470 | size_t bufin_rpos = 0; | 470 | size_t bufin_rpos = 0; |
471 | unsigned char *bufin_read; | 471 | unsigned char *bufin_read = NULL; |
472 | fd_set fds_w; | 472 | fd_set fds_w; |
473 | fd_set fds_r; | 473 | fd_set fds_r; |
474 | int max; | 474 | int max; |
@@ -477,7 +477,6 @@ run (int fd_tun) | |||
477 | { | 477 | { |
478 | FD_ZERO (&fds_w); | 478 | FD_ZERO (&fds_w); |
479 | FD_ZERO (&fds_r); | 479 | FD_ZERO (&fds_r); |
480 | bufin_read = NULL; | ||
481 | 480 | ||
482 | /* | 481 | /* |
483 | * We are supposed to read and the buffer is empty | 482 | * We are supposed to read and the buffer is empty |
@@ -578,6 +577,7 @@ run (int fd_tun) | |||
578 | bufin_size = read (0, bufin + bufin_rpos, MAX_SIZE - bufin_rpos); | 577 | bufin_size = read (0, bufin + bufin_rpos, MAX_SIZE - bufin_rpos); |
579 | if (-1 == bufin_size) | 578 | if (-1 == bufin_size) |
580 | { | 579 | { |
580 | bufin_read = NULL; | ||
581 | if ( (errno == EINTR) || | 581 | if ( (errno == EINTR) || |
582 | (errno == EAGAIN) ) | 582 | (errno == EAGAIN) ) |
583 | continue; | 583 | continue; |
@@ -586,6 +586,7 @@ run (int fd_tun) | |||
586 | } | 586 | } |
587 | if (0 == bufin_size) | 587 | if (0 == bufin_size) |
588 | { | 588 | { |
589 | bufin_read = NULL; | ||
589 | fprintf (stderr, "EOF on stdin\n"); | 590 | fprintf (stderr, "EOF on stdin\n"); |
590 | return; | 591 | return; |
591 | } | 592 | } |