[flow-tools] 0.55: ftio_write_header() returns wrong value upon failure

Jos Backus Jos Backus <josb@cncdsl.com>
Wed, 17 Oct 2001 16:41:07 -0700


The problem is that the wrong variable (ret) is being initialized. When a jump
to ftio_write_header_out occurs as a result of a failure condition, n needs to
be initialized instead. Fix:

--- lib/ftio.c.orig     Wed Oct 17 16:33:37 2001
+++ lib/ftio.c  Wed Oct 17 16:34:34 2001
@@ -1119,7 +1119,7 @@
   int n, ret, restore, flip, len;
   char *enc_buf;
 
-  ret = -1;
+  n = -1;
   restore = 0;
   enc_buf = (char*)0L;
 
Thanks,
-- 
Jos Backus                 _/  _/_/_/        Santa Clara, CA
                          _/  _/   _/
                         _/  _/_/_/             
                    _/  _/  _/    _/
josb@cncdsl.com     _/_/   _/_/_/            use Std::Disclaimer;