aboutsummaryrefslogtreecommitdiffstats
path: root/g10/openfile.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-04-01 13:24:55 +0000
committerWerner Koch <[email protected]>2010-04-01 13:24:55 +0000
commitf3839fe81ddd86632c1a4d70986bbe7e3a751fc2 (patch)
tree6fa1386cb24d9477a4d7ca95f6230baa5be6589f /g10/openfile.c
parentMinor cleanups (diff)
downloadgnupg-f3839fe81ddd86632c1a4d70986bbe7e3a751fc2.tar.gz
gnupg-f3839fe81ddd86632c1a4d70986bbe7e3a751fc2.zip
Use gpg_err_set_errno to assign values to ERRNO.
Diffstat (limited to 'g10/openfile.c')
-rw-r--r--g10/openfile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/g10/openfile.c b/g10/openfile.c
index b1cd294c1..eb12f0482 100644
--- a/g10/openfile.c
+++ b/g10/openfile.c
@@ -284,7 +284,7 @@ open_outfile (int inp_fd, const char *iname, int mode, iobuf_t *a)
if (is_secured_filename (name) )
{
*a = NULL;
- errno = EPERM;
+ gpg_err_set_errno (EPERM);
}
else
*a = iobuf_create (name);
@@ -329,7 +329,7 @@ open_sigfile( const char *iname, progress_filter_context_t *pfx )
{
iobuf_close (a);
a = NULL;
- errno = EPERM;
+ gpg_err_set_errno (EPERM);
}
if( a && opt.verbose )
log_info(_("assuming signed data in `%s'\n"), buf );
@@ -366,7 +366,7 @@ copy_options_file( const char *destdir )
{
fclose (src);
src = NULL;
- errno = EPERM;
+ gpg_err_set_errno (EPERM);
}
if( !src ) {
log_info (_("can't open `%s': %s\n"), fname, strerror(errno) );
@@ -378,7 +378,7 @@ copy_options_file( const char *destdir )
if ( is_secured_filename (fname) )
{
dst = NULL;
- errno = EPERM;
+ gpg_err_set_errno (EPERM);
}
else
dst = fopen( fname, "w" );