summaryrefslogtreecommitdiffstats
path: root/g10/dearmor.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-08-11 19:29:34 +0200
committerWerner Koch <wk@gnupg.org>1998-08-11 19:29:34 +0200
commit3e0e8f884f1ed37e120beeb57aa7cd79e3c145a0 (patch)
treedfff62df60f917addc9df4e83a1ed73e31041bab /g10/dearmor.c
parentrel 0.3.3 (diff)
downloadgnupg2-3e0e8f884f1ed37e120beeb57aa7cd79e3c145a0.tar.xz
gnupg2-3e0e8f884f1ed37e120beeb57aa7cd79e3c145a0.zip
bug fix releaseV0-3-4
Diffstat (limited to 'g10/dearmor.c')
-rw-r--r--g10/dearmor.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/g10/dearmor.c b/g10/dearmor.c
index 5fa038255..6b15f491b 100644
--- a/g10/dearmor.c
+++ b/g10/dearmor.c
@@ -58,10 +58,9 @@ dearmor_file( const char *fname )
iobuf_push_filter( inp, armor_filter, &afx );
- if( !(out = open_outfile( fname, 0 )) ) {
- rc = G10ERR_CREATE_FILE;
+ if( (rc = open_outfile( fname, 0, &out )) )
goto leave;
- }
+
while( (c = iobuf_get(inp)) != -1 )
@@ -100,10 +99,8 @@ enarmor_file( const char *fname )
}
- if( !(out = open_outfile( fname, 1 )) ) {
- rc = G10ERR_CREATE_FILE;
+ if( (rc = open_outfile( fname, 1, &out )) )
goto leave;
- }
afx.what = 4;
afx.hdrlines = "Comment: Use \"gpgm --dearmor\" for unpacking\n";