aboutsummaryrefslogtreecommitdiff
path: root/nis
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 /nis
parent82af0fa8de8201803ac670fa0de7d702ce9f0f18 (diff)
downloadglibc-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 'nis')
-rw-r--r--nis/nis_file.c6
-rw-r--r--nis/nss-default.c5
2 files changed, 6 insertions, 5 deletions
diff --git a/nis/nis_file.c b/nis/nis_file.c
index 566f30c..dc38242 100644
--- a/nis/nis_file.c
+++ b/nis/nis_file.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1998, 1999, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 1999, 2004, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
@@ -31,7 +31,7 @@ static void *
read_nis_obj (const char *name, iofct_t readfct, freefct_t freefct,
size_t objsize)
{
- FILE *in = fopen (name, "rc");
+ FILE *in = fopen (name, "rce");
if (in == NULL)
return NULL;
@@ -59,7 +59,7 @@ read_nis_obj (const char *name, iofct_t readfct, freefct_t freefct,
static bool_t
write_nis_obj (const char *name, const void *obj, iofct_t writefct)
{
- FILE *out = fopen (name, "w");
+ FILE *out = fopen (name, "wce");
if (out == NULL)
return FALSE;
diff --git a/nis/nss-default.c b/nis/nss-default.c
index d7a3293..e4dc3d6 100644
--- a/nis/nss-default.c
+++ b/nis/nss-default.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996,2001,2004,2006,2007,2010 Free Software Foundation, Inc.
+/* Copyright (C) 1996,2001,2004,2006,2007,2010,2011
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -57,7 +58,7 @@ static void
init (void)
{
int saved_errno = errno;
- FILE *fp = fopen (default_nss, "rc");
+ FILE *fp = fopen (default_nss, "rce");
if (fp != NULL)
{
char *line = NULL;