summaryrefslogtreecommitdiffstats
path: root/g10/plaintext.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2010-04-01 15:24:55 +0200
committerWerner Koch <wk@gnupg.org>2010-04-01 15:24:55 +0200
commitf3839fe81ddd86632c1a4d70986bbe7e3a751fc2 (patch)
tree6fa1386cb24d9477a4d7ca95f6230baa5be6589f /g10/plaintext.c
parentMinor cleanups (diff)
downloadgnupg2-f3839fe81ddd86632c1a4d70986bbe7e3a751fc2.tar.xz
gnupg2-f3839fe81ddd86632c1a4d70986bbe7e3a751fc2.zip
Use gpg_err_set_errno to assign values to ERRNO.
Diffstat (limited to 'g10/plaintext.c')
-rw-r--r--g10/plaintext.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/g10/plaintext.c b/g10/plaintext.c
index 0a7415c9e..85f7165bd 100644
--- a/g10/plaintext.c
+++ b/g10/plaintext.c
@@ -158,7 +158,7 @@ handle_plaintext (PKT_plaintext * pt, md_filter_context_t * mfx,
;
else if (is_secured_filename (fname))
{
- errno = EPERM;
+ gpg_err_set_errno (EPERM);
rc = gpg_error_from_syserror ();
log_error (_("error creating `%s': %s\n"), fname, strerror (errno));
goto leave;
@@ -548,7 +548,7 @@ ask_for_detached_datafile (gcry_md_hd_t md, gcry_md_hd_t md2,
{
iobuf_close (fp);
fp = NULL;
- errno = EPERM;
+ gpg_err_set_errno (EPERM);
}
if (!fp && errno == ENOENT)
{
@@ -622,7 +622,7 @@ hash_datafiles (gcry_md_hd_t md, gcry_md_hd_t md2, strlist_t files,
{
iobuf_close (fp);
fp = NULL;
- errno = EPERM;
+ gpg_err_set_errno (EPERM);
}
if (!fp)
{
@@ -654,7 +654,7 @@ hash_datafile_by_fd (gcry_md_hd_t md, gcry_md_hd_t md2, int data_fd,
if (is_secured_file (data_fd))
{
fp = NULL;
- errno = EPERM;
+ gpg_err_set_errno (EPERM);
}
else
fp = iobuf_fdopen_nc (data_fd, "rb");