diff options
author | Marcus Brinkmann <[email protected]> | 2003-06-03 23:38:53 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2003-06-03 23:38:53 +0000 |
commit | 206225305924d8fde785ef194e1f29546f83b12a (patch) | |
tree | 50e3455cae15d16251c13270127f8b6f16d442a8 /src/code-from-errno.c | |
parent | 2003-06-04 Marcus Brinkmann <[email protected]> (diff) | |
download | libgpg-error-206225305924d8fde785ef194e1f29546f83b12a.tar.gz libgpg-error-206225305924d8fde785ef194e1f29546f83b12a.zip |
2003-06-04 Marcus Brinkmann <[email protected]>
* src/gpg-error.h (gpg_make_error_from_errno): New inline function.
(gpg_error_from_errno): Likewise.
* src/code-from-errno.c (gpg_err_code_from_errno): Handle the case
of no error at all.
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; |