]> git.imager.perl.org - imager.git/commitdiff
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 f26a4bce68fce45f9dc7d21978d7d8238805abb2..478ef95675b81c0ae05dc55a2c0f55d40b8516da 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;