summaryrefslogtreecommitdiffstats
path: root/g10/free-packet.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1999-05-31 19:49:37 +0200
committerWerner Koch <wk@gnupg.org>1999-05-31 19:49:37 +0200
commitc34c67695888aafe5fb4fa0b2c2345bede16cefe (patch)
treed0a9d9d99d05a6a530712a4a432ecaf6ea94c880 /g10/free-packet.c
parentSee ChangeLog: Thu May 27 09:40:55 CEST 1999 Werner Koch (diff)
downloadgnupg2-c34c67695888aafe5fb4fa0b2c2345bede16cefe.tar.xz
gnupg2-c34c67695888aafe5fb4fa0b2c2345bede16cefe.zip
See ChangeLog: Mon May 31 19:41:10 CEST 1999 Werner Koch
Diffstat (limited to 'g10/free-packet.c')
-rw-r--r--g10/free-packet.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/g10/free-packet.c b/g10/free-packet.c
index aef8e2fb0..5d74544fc 100644
--- a/g10/free-packet.c
+++ b/g10/free-packet.c
@@ -229,7 +229,7 @@ free_compressed( PKT_compressed *zd )
if( zd->buf ) { /* have to skip some bytes */
/* don't have any information about the length, so
* we assume this is the last packet */
- while( iobuf_get(zd->buf) != -1 )
+ while( iobuf_read( zd->buf, NULL, 1<<30 ) != -1 )
;
}
m_free(zd);
@@ -240,12 +240,12 @@ free_encrypted( PKT_encrypted *ed )
{
if( ed->buf ) { /* have to skip some bytes */
if( iobuf_in_block_mode(ed->buf) ) {
- while( iobuf_get(ed->buf) != -1 )
+ while( iobuf_read( ed->buf, NULL, 1<<30 ) != -1 )
;
}
else {
- for( ; ed->len; ed->len-- ) /* skip the packet */
- iobuf_get(ed->buf);
+ while( ed->len ) /* skip the packet */
+ ed->len -= iobuf_read( ed->buf, NULL, ed->len );
}
}
m_free(ed);
@@ -257,12 +257,12 @@ free_plaintext( PKT_plaintext *pt )
{
if( pt->buf ) { /* have to skip some bytes */
if( iobuf_in_block_mode(pt->buf) ) {
- while( iobuf_get(pt->buf) != -1 )
+ while( iobuf_read( pt->buf, NULL, 1<<30 ) != -1 )
;
}
else {
- for( ; pt->len; pt->len-- ) /* skip the packet */
- iobuf_get(pt->buf);
+ while( pt->len ) /* skip the packet */
+ pt->len -= iobuf_read( pt->buf, NULL, pt->len );
}
}
m_free(pt);