summaryrefslogtreecommitdiff
path: root/nis/nis_file.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-11-02 12:26:42 +0000
committerJakub Jelinek <jakub@redhat.com>2004-11-02 12:26:42 +0000
commit80c96e8e6f452d6d9803f5a2e17030658f30afc4 (patch)
treeef584f35ed7167c7a680783415a66799c3789233 /nis/nis_file.c
parent0b5cfa4e0b7c9dc2cd81635307613c86c0f5e200 (diff)
Updated to fedora-glibc-20041102T1153
Diffstat (limited to 'nis/nis_file.c')
-rw-r--r--nis/nis_file.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/nis/nis_file.c b/nis/nis_file.c
index c84fb3c6c9..1f2295787c 100644
--- a/nis/nis_file.c
+++ b/nis/nis_file.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 1999, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
@@ -28,21 +28,17 @@ static const char cold_start_file[] = "/var/nis/NIS_COLD_START";
directory_obj *
readColdStartFile (void)
{
- XDR xdrs;
- FILE *in;
- bool_t status = TRUE;
- directory_obj *obj;
-
- in = fopen (cold_start_file, "rb");
+ FILE *in = fopen (cold_start_file, "rc");
if (in == NULL)
return NULL;
- obj = calloc (1, sizeof (directory_obj));
+ directory_obj *obj = calloc (1, sizeof (directory_obj));
if (obj != NULL)
{
+ XDR xdrs;
xdrstdio_create (&xdrs, in, XDR_DECODE);
- status = _xdr_directory_obj (&xdrs, obj);
+ bool_t status = _xdr_directory_obj (&xdrs, obj);
xdr_destroy (&xdrs);
if (!status)
@@ -56,6 +52,7 @@ readColdStartFile (void)
return obj;
}
+libnsl_hidden_def (readColdStartFile)
bool_t
writeColdStartFile (const directory_obj *obj)