aboutsummaryrefslogtreecommitdiff
path: root/nis/nis_subr.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-10-24 20:29:20 +0000
committerUlrich Drepper <drepper@redhat.com>2004-10-24 20:29:20 +0000
commit7440c23e03fac030ec163f331c1084e6bcf0c8c1 (patch)
tree4bc151c37adfde0a7b2e67e16fc6b2c9dd64c421 /nis/nis_subr.c
parent1d5cee233d407b0abca1c64b2de712619c26ede4 (diff)
downloadglibc-7440c23e03fac030ec163f331c1084e6bcf0c8c1.zip
glibc-7440c23e03fac030ec163f331c1084e6bcf0c8c1.tar.gz
glibc-7440c23e03fac030ec163f331c1084e6bcf0c8c1.tar.bz2
Update.
* include/libc-symbols.h: Define hidden attribute macros for libnsl. * include/rpcsvc/nislib.h: Use libnsl_hidden_proto for various functions. * nis/nis_add.c: Add libnsl_hidden_def. Minor optimizations. * nis/nis_call.c: Likewise. * nis/nis_clone_obj.c: Likewise. * nis/nis_defaults.c: Likewise. * nis/nis_domain_of_r.c: Likewise. * nis/nis_error.c: Likewise. * nis/nis_file.c: Likewise. * nis/nis_free.c: Likewise. * nis/nis_local_names.c: Likewise. * nis/nis_lookup.c: Likewise. * nis/nis_modify.c: Likewise. * nis/nis_print.c: Likewise. * nis/nis_remove.c: Likewise. * nis/nis_subr.c: Likewise. * nis/nis_table.c: Likewise. * nis/nis_util.c: Likewise. * nis/yp_xdr.c: Likewise. * nis/ypclnt.c: Likewise. * nis/ypupdate_xdr.c: Likewise.
Diffstat (limited to 'nis/nis_subr.c')
-rw-r--r--nis/nis_subr.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/nis/nis_subr.c b/nis/nis_subr.c
index 78e58ae..4c4ef8b 100644
--- a/nis/nis_subr.c
+++ b/nis/nis_subr.c
@@ -41,7 +41,7 @@ nis_leaf_of_r (const_nis_name name, char *buffer, size_t buflen)
if (i > buflen - 1)
{
- errno = ERANGE;
+ __set_errno (ERANGE);
return NULL;
}
@@ -49,7 +49,7 @@ nis_leaf_of_r (const_nis_name name, char *buffer, size_t buflen)
{
if ((size_t)i >= buflen)
{
- errno = ERANGE;
+ __set_errno (ERANGE);
return NULL;
}
@@ -58,6 +58,7 @@ nis_leaf_of_r (const_nis_name name, char *buffer, size_t buflen)
return buffer;
}
+libnsl_hidden_def (nis_leaf_of_r)
nis_name
nis_name_of (const_nis_name name)
@@ -84,7 +85,7 @@ nis_name_of_r (const_nis_name name, char *buffer, size_t buflen)
if ((size_t) diff >= buflen)
{
- errno = ERANGE;
+ __set_errno (ERANGE);
return NULL;
}
@@ -95,14 +96,15 @@ nis_name_of_r (const_nis_name name, char *buffer, size_t buflen)
return buffer;
}
+libnsl_hidden_def (nis_name_of_r)
static int
count_dots (const_nis_name str)
{
int count = 0;
- size_t i;
+ size_t l = strlen (str);
- for (i = 0; i < strlen (str); ++i)
+ for (size_t i = 0; i < l; ++i)
if (str[i] == '.')
++count;
@@ -252,6 +254,7 @@ nis_getnames (const_nis_name name)
return getnames;
}
+libnsl_hidden_def (nis_getnames)
void
nis_freenames (nis_name *names)
@@ -266,6 +269,7 @@ nis_freenames (nis_name *names)
free (names);
}
+libnsl_hidden_def (nis_freenames)
name_pos
nis_dir_cmp (const_nis_name n1, const_nis_name n2)
@@ -303,9 +307,11 @@ nis_dir_cmp (const_nis_name n1, const_nis_name n2)
}
}
+libnsl_hidden_def (nis_dir_cmp)
void
nis_destroy_object (nis_object *obj)
{
nis_free_object (obj);
}
+libnsl_hidden_def (nis_destroy_object)