move a variable declaration to the top of a block for C89 compat
authorTony Cook <tony@develop-help.com>
Mon, 17 Oct 2011 05:30:07 +0000 (16:30 +1100)
committerTony Cook <tony@develop-help.com>
Mon, 17 Oct 2011 05:35:04 +0000 (16:35 +1100)
iolayer.c

index f26a4bc..478ef95 100644 (file)
--- a/iolayer.c
+++ b/iolayer.c
@@ -586,12 +586,12 @@ i_io_putc_imp(io_glue *ig, int c) {
   if (!ig->buffered) {
     char buf = c;
     ssize_t write_result;
+    int result = c;
 
     if (ig->error)
       return EOF;
 
     write_result = i_io_raw_write(ig, &buf, 1);
-    int result = c;
     if (write_result != 1) {
       ig->error = 1;
       result = EOF;