diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-11-15 04:24:42 -0500 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-11-15 04:24:42 -0500 |
commit | 312be3f9f5eab1643d7dcc7728c76d413d4f2640 (patch) | |
tree | 445eab9ef93914585b6625aa6ca93c24715771b7 /resolv | |
parent | 82af0fa8de8201803ac670fa0de7d702ce9f0f18 (diff) | |
download | glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.zip glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.tar.gz glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.tar.bz2 |
Clean up internal fopen uses
No need to ever not use c and e.
Diffstat (limited to 'resolv')
-rw-r--r-- | resolv/gethnamaddr.c | 6 | ||||
-rw-r--r-- | resolv/res_hconf.c | 2 | ||||
-rw-r--r-- | resolv/res_query.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c index 5cf660a..a8ccf1f 100644 --- a/resolv/gethnamaddr.c +++ b/resolv/gethnamaddr.c @@ -585,7 +585,7 @@ gethostbyname2(name, af) } if (!isdigit(*cp) && *cp != '.') break; - } + } if ((isxdigit(name[0]) && strchr(name, ':') != NULL) || name[0] == ':') for (cp = name;; ++cp) { @@ -787,7 +787,7 @@ _sethtent(f) int f; { if (!hostf) - hostf = fopen(_PATH_HOSTS, "r" ); + hostf = fopen(_PATH_HOSTS, "rce" ); else rewind(hostf); stayopen = f; @@ -810,7 +810,7 @@ _gethtent() register char *cp, **q; int af, len; - if (!hostf && !(hostf = fopen(_PATH_HOSTS, "r" ))) { + if (!hostf && !(hostf = fopen(_PATH_HOSTS, "rce" ))) { __set_h_errno (NETDB_INTERNAL); return (NULL); } diff --git a/resolv/res_hconf.c b/resolv/res_hconf.c index 7b167bb..6f831ec 100644 --- a/resolv/res_hconf.c +++ b/resolv/res_hconf.c @@ -307,7 +307,7 @@ do_init (void) if (hconf_name == NULL) hconf_name = _PATH_HOSTCONF; - fp = fopen (hconf_name, "rc"); + fp = fopen (hconf_name, "rce"); if (fp) { /* No threads using this stream. */ diff --git a/resolv/res_query.c b/resolv/res_query.c index 2f7cfaa..947c651 100644 --- a/resolv/res_query.c +++ b/resolv/res_query.c @@ -602,7 +602,7 @@ res_hostalias(const res_state statp, const char *name, char *dst, size_t siz) { if (statp->options & RES_NOALIASES) return (NULL); file = getenv("HOSTALIASES"); - if (file == NULL || (fp = fopen(file, "r")) == NULL) + if (file == NULL || (fp = fopen(file, "rce")) == NULL) return (NULL); setbuf(fp, NULL); buf[sizeof(buf) - 1] = '\0'; |