From 7fac4634eafd2959dc216b6d389818fe85c133d2 Mon Sep 17 00:00:00 2001 From: ueno Date: Fri, 11 Aug 2006 02:46:02 +0000 Subject: [PATCH] Don't use goto readtop: --- starttls.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/starttls.c b/starttls.c index 52a2329..259960a 100644 --- a/starttls.c +++ b/starttls.c @@ -251,21 +251,17 @@ main (argc, argv) if (readfds[0].revents & POLLIN) { nbuffer = read (in, buffer, sizeof buffer -1); - if (nbuffer == 0) goto finish; redirect (tls_fd, buffer, nbuffer, tls_write); } if (readfds[1].revents & POLLIN) - { -readtop: - nbuffer = tls_read(tls_fd, buffer, sizeof buffer -1); + do { + nbuffer = tls_read (tls_fd, buffer, sizeof buffer -1); if (nbuffer == 0) goto finish; redirect (out, buffer, nbuffer, write); - if (tls_pending()) - goto readtop; - } + } while (tls_pending ()); } finish: -- 1.7.10.4