summaryrefslogtreecommitdiffstats
path: root/g10/plaintext.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2007-06-06 20:12:30 +0200
committerWerner Koch <wk@gnupg.org>2007-06-06 20:12:30 +0200
commit2c9791db555cc571eaedfa71444da05454bd052a (patch)
tree9566d22f85e562e0c7b35dacc1697c9a58fcff1a /g10/plaintext.c
parentPrint passphrase encoding info only in PEM mode. (diff)
downloadgnupg2-2c9791db555cc571eaedfa71444da05454bd052a.tar.xz
gnupg2-2c9791db555cc571eaedfa71444da05454bd052a.zip
First steps towards supporting W32.
This is mainly source code reorganization. Update gnulib. g10/ does currently not build.
Diffstat (limited to 'g10/plaintext.c')
-rw-r--r--g10/plaintext.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/g10/plaintext.c b/g10/plaintext.c
index fd165237e..4e48ddfbb 100644
--- a/g10/plaintext.c
+++ b/g10/plaintext.c
@@ -297,8 +297,9 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
}
else { /* binary mode */
byte *buffer = xmalloc( 32768 );
- int eof;
- for( eof=0; !eof; ) {
+ int eof_seen = 0;
+
+ while ( !eof_seen ) {
/* Why do we check for len < 32768:
* If we won't, we would practically read 2 EOFs but
* the first one has already popped the block_filter
@@ -309,7 +310,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
if( len == -1 )
break;
if( len < 32768 )
- eof = 1;
+ eof_seen = 1;
if( mfx->md )
gcry_md_write ( mfx->md, buffer, len );
if( fp )