aboutsummaryrefslogtreecommitdiffstats
path: root/g10/parse-packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/parse-packet.c')
-rw-r--r--g10/parse-packet.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index b4dfb8c84..cd6e1dbe6 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -491,11 +491,10 @@ parse( IOBUF inp, PACKET *pkt, int onlykeypkts, off_t *retpos,
}
if( out && pkttype ) {
- if( iobuf_write( out, hdr, hdrlen ) == -1 )
- rc = G10ERR_WRITE_FILE;
- else
+ rc = iobuf_write (out, hdr, hdrlen);
+ if (!rc)
rc = copy_packet(inp, out, pkttype, pktlen, partial );
- goto leave;
+ goto leave;
}
if (with_uid && pkttype == PKT_USER_ID)