about summary refs log tree commit diff
path: root/resolv/res_query.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-11-15 04:24:42 -0500
committerUlrich Drepper <drepper@gmail.com>2011-11-15 04:24:42 -0500
commit312be3f9f5eab1643d7dcc7728c76d413d4f2640 (patch)
tree445eab9ef93914585b6625aa6ca93c24715771b7 /resolv/res_query.c
parent82af0fa8de8201803ac670fa0de7d702ce9f0f18 (diff)
downloadglibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.tar.gz
glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.tar.xz
glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.zip
Clean up internal fopen uses
No need to ever not use c and e.
Diffstat (limited to 'resolv/res_query.c')
-rw-r--r--resolv/res_query.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/resolv/res_query.c b/resolv/res_query.c
index 2f7cfaa4b7..947c6513a2 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';