diff options
Diffstat (limited to 'resolv')
-rw-r--r-- | resolv/inet_net_ntop.c | 6 | ||||
-rw-r--r-- | resolv/inet_net_pton.c | 6 | ||||
-rw-r--r-- | resolv/inet_neta.c | 2 | ||||
-rw-r--r-- | resolv/inet_ntop.c | 6 | ||||
-rw-r--r-- | resolv/inet_pton.c | 2 | ||||
-rw-r--r-- | resolv/res_query.c | 2 | ||||
-rw-r--r-- | resolv/res_send.c | 16 |
7 files changed, 20 insertions, 20 deletions
diff --git a/resolv/inet_net_ntop.c b/resolv/inet_net_ntop.c index 80abefcba7..497b0af7c6 100644 --- a/resolv/inet_net_ntop.c +++ b/resolv/inet_net_ntop.c @@ -60,7 +60,7 @@ inet_net_ntop(af, src, bits, dst, size) case AF_INET: return (inet_net_ntop_ipv4(src, bits, dst, size)); default: - errno = EAFNOSUPPORT; + __set_errno (EAFNOSUPPORT); return (NULL); } } @@ -91,7 +91,7 @@ inet_net_ntop_ipv4(src, bits, dst, size) int b; if (bits < 0 || bits > 32) { - errno = EINVAL; + __set_errno (EINVAL); return (NULL); } if (bits == 0) { @@ -134,6 +134,6 @@ inet_net_ntop_ipv4(src, bits, dst, size) return (odst); emsgsize: - errno = EMSGSIZE; + __set_errno (EMSGSIZE); return (NULL); } diff --git a/resolv/inet_net_pton.c b/resolv/inet_net_pton.c index ea9b2d4b55..7c863492d7 100644 --- a/resolv/inet_net_pton.c +++ b/resolv/inet_net_pton.c @@ -64,7 +64,7 @@ inet_net_pton(af, src, dst, size) case AF_INET: return (inet_net_pton_ipv4(src, dst, size)); default: - errno = EAFNOSUPPORT; + __set_errno (EAFNOSUPPORT); return (-1); } } @@ -192,10 +192,10 @@ inet_net_pton_ipv4(src, dst, size) return (bits); enoent: - errno = ENOENT; + __set_errno (ENOENT); return (-1); emsgsize: - errno = EMSGSIZE; + __set_errno (EMSGSIZE); return (-1); } diff --git a/resolv/inet_neta.c b/resolv/inet_neta.c index ff92d5f2dc..27908d4a47 100644 --- a/resolv/inet_neta.c +++ b/resolv/inet_neta.c @@ -77,6 +77,6 @@ inet_neta(src, dst, size) return (odst); emsgsize: - errno = EMSGSIZE; + __set_errno (EMSGSIZE); return (NULL); } diff --git a/resolv/inet_ntop.c b/resolv/inet_ntop.c index a378f3a383..bbdabd0fe0 100644 --- a/resolv/inet_ntop.c +++ b/resolv/inet_ntop.c @@ -64,7 +64,7 @@ inet_ntop(af, src, dst, size) case AF_INET6: return (inet_ntop6(src, dst, size)); default: - errno = EAFNOSUPPORT; + __set_errno (EAFNOSUPPORT); return (NULL); } /* NOTREACHED */ @@ -91,7 +91,7 @@ inet_ntop4(src, dst, size) char tmp[sizeof "255.255.255.255"]; if (SPRINTF((tmp, fmt, src[0], src[1], src[2], src[3])) > size) { - errno = ENOSPC; + __set_errno (ENOSPC); return (NULL); } strcpy(dst, tmp); @@ -187,7 +187,7 @@ inet_ntop6(src, dst, size) * Check for overflow, copy, and we're done. */ if ((size_t)(tp - tmp) > size) { - errno = ENOSPC; + __set_errno (ENOSPC); return (NULL); } strcpy(dst, tmp); diff --git a/resolv/inet_pton.c b/resolv/inet_pton.c index 2315de59cd..3593da262b 100644 --- a/resolv/inet_pton.c +++ b/resolv/inet_pton.c @@ -59,7 +59,7 @@ inet_pton(af, src, dst) case AF_INET6: return (inet_pton6(src, dst)); default: - errno = EAFNOSUPPORT; + __set_errno (EAFNOSUPPORT); return (-1); } /* NOTREACHED */ diff --git a/resolv/res_query.c b/resolv/res_query.c index 2d191d0332..e9898023bf 100644 --- a/resolv/res_query.c +++ b/resolv/res_query.c @@ -192,7 +192,7 @@ res_search(name, class, type, answer, anslen) h_errno = NETDB_INTERNAL; return (-1); } - errno = 0; + __set_errno (0); h_errno = HOST_NOT_FOUND; /* default, if we never query */ dots = 0; for (cp = name; *cp; cp++) diff --git a/resolv/res_send.c b/resolv/res_send.c index 4c258b99bf..3efc6cf96f 100644 --- a/resolv/res_send.c +++ b/resolv/res_send.c @@ -144,7 +144,7 @@ static int vc = 0; /* is the socket a virtual ciruit? */ ntohs(address.sin_port), strerror(error)); } - errno = save; + __set_errno (save); } static void Perror(file, string, error) @@ -158,7 +158,7 @@ static int vc = 0; /* is the socket a virtual ciruit? */ fprintf(file, "res_send: %s: %s\n", string, strerror(error)); } - errno = save; + __set_errno (save); } #endif @@ -380,7 +380,7 @@ res_send(buf, buflen, ans, anssiz) Perror(stderr, "socket(vc)", errno); return (-1); } - errno = 0; + __set_errno (0); if (connect(s, (struct sockaddr *)nsap, sizeof(struct sockaddr)) < 0) { terrno = errno; @@ -581,7 +581,7 @@ read_len: (stdout, ";; new DG socket\n")) #endif connected = 0; - errno = 0; + __set_errno (0); } if (sendto(s, (char*)buf, buflen, 0, (struct sockaddr *)nsap, @@ -625,7 +625,7 @@ read_len: _res_close(); goto next_ns; } - errno = 0; + __set_errno (0); fromlen = sizeof(struct sockaddr_in); resplen = recvfrom(s, (char*)ans, anssiz, 0, (struct sockaddr *)&from, &fromlen); @@ -756,11 +756,11 @@ read_len: _res_close(); if (!v_circuit) if (!gotsomewhere) - errno = ECONNREFUSED; /* no nameservers found */ + __set_errno (ECONNREFUSED); /* no nameservers found */ else - errno = ETIMEDOUT; /* no answer obtained */ + __set_errno (ETIMEDOUT); /* no answer obtained */ else - errno = terrno; + __set_errno (terrno); return (-1); } |