aboutsummaryrefslogtreecommitdiffstats
path: root/set_error.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--set_error.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/set_error.c b/set_error.c
index e7a16ac..839a027 100644
--- a/set_error.c
+++ b/set_error.c
@@ -33,7 +33,7 @@ liberror_set_error(const char description[256], const char source[64], const cha
} else if (!strcmp(code_group, "h_errno")) {
if (code >= (long long int)INT_MIN && code <= (long long int)INT_MAX) {
saved_errno = errno;
- errstr = hstrerror(code);
+ errstr = hstrerror((int)code);
if (errstr)
strncpy(error->description, errstr, sizeof(error->description));
errno = saved_errno;
@@ -43,7 +43,7 @@ liberror_set_error(const char description[256], const char source[64], const cha
strerror_r(errno, error->description, sizeof(error->description));
} else if (code >= (long long int)INT_MIN && code <= (long long int)INT_MAX) {
saved_errno = errno;
- errstr = gai_strerror(code);
+ errstr = gai_strerror((int)code);
if (errstr)
strncpy(error->description, errstr, sizeof(error->description));
errno = saved_errno;