diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-06-07 22:24:35 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-06-07 22:24:35 +0000 |
commit | 2e09a79ada1f6d92809a037d41895e3d9302ad59 (patch) | |
tree | 999c9d18279a7de289937116273ae4016356aa3a /resolv | |
parent | 8e254d8e0d0820716e0ccf5f2b89c4fd1325f051 (diff) | |
download | glibc-2e09a79ada1f6d92809a037d41895e3d9302ad59.tar.gz glibc-2e09a79ada1f6d92809a037d41895e3d9302ad59.tar.xz glibc-2e09a79ada1f6d92809a037d41895e3d9302ad59.zip |
Avoid use of "register" as optimization hint.
Diffstat (limited to 'resolv')
-rw-r--r-- | resolv/arpa/nameser.h | 12 | ||||
-rw-r--r-- | resolv/gethnamaddr.c | 22 | ||||
-rw-r--r-- | resolv/ns_print.c | 2 | ||||
-rw-r--r-- | resolv/nss_dns/dns-host.c | 4 | ||||
-rw-r--r-- | resolv/res_init.c | 8 | ||||
-rw-r--r-- | resolv/res_mkquery.c | 6 |
6 files changed, 27 insertions, 27 deletions
diff --git a/resolv/arpa/nameser.h b/resolv/arpa/nameser.h index 6a2c8376bd..fb8513ba9b 100644 --- a/resolv/arpa/nameser.h +++ b/resolv/arpa/nameser.h @@ -433,7 +433,7 @@ typedef enum __ns_cert_types { * Inline versions of get/put short/long. Pointer is advanced. */ #define NS_GET16(s, cp) do { \ - register const u_char *t_cp = (const u_char *)(cp); \ + const u_char *t_cp = (const u_char *)(cp); \ (s) = ((u_int16_t)t_cp[0] << 8) \ | ((u_int16_t)t_cp[1]) \ ; \ @@ -441,7 +441,7 @@ typedef enum __ns_cert_types { } while (0) #define NS_GET32(l, cp) do { \ - register const u_char *t_cp = (const u_char *)(cp); \ + const u_char *t_cp = (const u_char *)(cp); \ (l) = ((u_int32_t)t_cp[0] << 24) \ | ((u_int32_t)t_cp[1] << 16) \ | ((u_int32_t)t_cp[2] << 8) \ @@ -451,16 +451,16 @@ typedef enum __ns_cert_types { } while (0) #define NS_PUT16(s, cp) do { \ - register u_int16_t t_s = (u_int16_t)(s); \ - register u_char *t_cp = (u_char *)(cp); \ + u_int16_t t_s = (u_int16_t)(s); \ + u_char *t_cp = (u_char *)(cp); \ *t_cp++ = t_s >> 8; \ *t_cp = t_s; \ (cp) += NS_INT16SZ; \ } while (0) #define NS_PUT32(l, cp) do { \ - register u_int32_t t_l = (u_int32_t)(l); \ - register u_char *t_cp = (u_char *)(cp); \ + u_int32_t t_l = (u_int32_t)(l); \ + u_char *t_cp = (u_char *)(cp); \ *t_cp++ = t_l >> 24; \ *t_cp++ = t_l >> 16; \ *t_cp++ = t_l >> 8; \ diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c index a8ccf1fd3a..9568c06475 100644 --- a/resolv/gethnamaddr.c +++ b/resolv/gethnamaddr.c @@ -178,9 +178,9 @@ Dprintf(msg, num) static struct hostent * getanswer (const querybuf *answer, int anslen, const char *qname, int qtype) { - register const HEADER *hp; - register const u_char *cp; - register int n; + const HEADER *hp; + const u_char *cp; + int n; const u_char *eom, *erdata; char *bp, **ap, **hap; int type, class, buflen, ancount, qdcount; @@ -409,7 +409,7 @@ getanswer (const querybuf *answer, int anslen, const char *qname, int qtype) continue; } if (!haveanswer) { - register int nn; + int nn; host.h_name = bp; nn = strlen(bp) + 1; /* for the \0 */ @@ -514,7 +514,7 @@ gethostbyname2(name, af) u_char *ptr; } buf; querybuf *origbuf; - register const char *cp; + const char *cp; char *bp; int n, size, type, len; struct hostent *ret; @@ -653,10 +653,10 @@ gethostbyaddr(addr, len, af) u_char *ptr; } buf; querybuf *orig_buf; - register struct hostent *hp; + struct hostent *hp; char qbuf[MAXDNAME+1], *qp = NULL; #ifdef SUNSECURITY - register struct hostent *rhp; + struct hostent *rhp; char **haddr; u_long old_options; char hname2[MAXDNAME+1]; @@ -807,7 +807,7 @@ struct hostent * _gethtent() { char *p; - register char *cp, **q; + char *cp, **q; int af, len; if (!hostf && !(hostf = fopen(_PATH_HOSTS, "rce" ))) { @@ -888,8 +888,8 @@ _gethtbyname2(name, af) const char *name; int af; { - register struct hostent *p; - register char **cp; + struct hostent *p; + char **cp; _sethtent(0); while ((p = _gethtent())) { @@ -913,7 +913,7 @@ _gethtbyaddr(addr, len, af) size_t len; int af; { - register struct hostent *p; + struct hostent *p; _sethtent(0); while ((p = _gethtent())) diff --git a/resolv/ns_print.c b/resolv/ns_print.c index 36d39784a5..800680d371 100644 --- a/resolv/ns_print.c +++ b/resolv/ns_print.c @@ -935,7 +935,7 @@ dst_s_id_calc(const u_char *key, const int keysize) static u_int16_t dst_s_get_int16(const u_char *buf) { - register u_int16_t a = 0; + u_int16_t a = 0; a = ((u_int16_t)(buf[0] << 8)) | ((u_int16_t)(buf[1])); return (a); } diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c index af5c166da9..9018bb98a6 100644 --- a/resolv/nss_dns/dns-host.c +++ b/resolv/nss_dns/dns-host.c @@ -601,7 +601,7 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype, char *h_addr_ptrs[0]; } *host_data; int linebuflen; - register const HEADER *hp; + const HEADER *hp; const u_char *end_of_message, *cp; int n, ancount, qdcount; int haveanswer, had_error; @@ -920,7 +920,7 @@ getanswer_r (const querybuf *answer, int anslen, const char *qname, int qtype, } if (!haveanswer) { - register int nn; + int nn; /* We compose a single hostent out of the entire chain of entries, so the TTL of the hostent is essentially the lowest diff --git a/resolv/res_init.c b/resolv/res_init.c index 002dec5c57..5e1a747a4a 100644 --- a/resolv/res_init.c +++ b/resolv/res_init.c @@ -149,9 +149,9 @@ libc_hidden_def (__res_ninit) /* This function has to be reachable by res_data.c but not publically. */ int __res_vinit(res_state statp, int preinit) { - register FILE *fp; - register char *cp, **pp; - register int n; + FILE *fp; + char *cp, **pp; + int n; char buf[BUFSIZ]; int nserv = 0; /* number of nameserver records read from file */ #ifdef _LIBC @@ -571,7 +571,7 @@ static u_int32_t net_mask(in) /* XXX - should really use system's version of this */ struct in_addr in; { - register u_int32_t i = ntohl(in.s_addr); + u_int32_t i = ntohl(in.s_addr); if (IN_CLASSA(i)) return (htonl(IN_CLASSA_NET)); diff --git a/resolv/res_mkquery.c b/resolv/res_mkquery.c index e2c6a742c0..c0798dc54e 100644 --- a/resolv/res_mkquery.c +++ b/resolv/res_mkquery.c @@ -104,9 +104,9 @@ res_nmkquery(res_state statp, u_char *buf, /* buffer to put query */ int buflen) /* size of buffer */ { - register HEADER *hp; - register u_char *cp; - register int n; + HEADER *hp; + u_char *cp; + int n; u_char *dnptrs[20], **dpp, **lastdnptr; #ifdef DEBUG |