tevent: Move a variable declaration into a while block
authorVolker Lendecke <vl@samba.org>
Fri, 12 Aug 2016 14:07:07 +0000 (16:07 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 23 Aug 2016 23:33:48 +0000 (01:33 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/tevent/tevent.c

index d286850c864ca2567fba9bbf5013a996be616026..e35eb5ddc93a86c0b68a4949a3ee3611eb19c3a7 100644 (file)
@@ -840,9 +840,9 @@ static void wakeup_pipe_handler(struct tevent_context *ev,
 {
        ssize_t ret;
 
-       char c[16];
        /* its non-blocking, doesn't matter if we read too much */
        do {
+               char c[16];
                ret = read(fde->fd, c, sizeof(c));
        } while (ret == -1 && errno == EINTR);
 }