diff options
Diffstat (limited to 'src/code-from-errno.c')
-rw-r--r-- | src/code-from-errno.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/code-from-errno.c b/src/code-from-errno.c index 5312389..5c97a7b 100644 --- a/src/code-from-errno.c +++ b/src/code-from-errno.c @@ -34,6 +34,9 @@ gpg_err_code_from_errno (int err) { int idx = errno_to_idx (err); + if (!err) + return GPG_ERR_NO_ERROR; + if (idx < 0) return GPG_ERR_UNKNOWN_ERRNO; |