aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-09-06 14:06:50 -0400
committerRich Felker <dalias@aerifal.cx>2018-09-12 14:34:28 -0400
commit736a950b3d4f476018d2909302be6d150530df50 (patch)
treeeb0b0400735a741c14cf4a1474762396b920f3ca
parent10bbbbf5c63085b84d683c2d597ba482d6dd07d9 (diff)
downloadmusl-736a950b3d4f476018d2909302be6d150530df50.zip
musl-736a950b3d4f476018d2909302be6d150530df50.tar.gz
musl-736a950b3d4f476018d2909302be6d150530df50.tar.bz2
make inadvertently exposed __h{create,delete,search}_r functions static
-rw-r--r--src/search/hsearch.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/search/hsearch.c b/src/search/hsearch.c
index 5c89651..1dcb4d8 100644
--- a/src/search/hsearch.c
+++ b/src/search/hsearch.c
@@ -24,9 +24,9 @@ struct __tab {
static struct hsearch_data htab;
-int __hcreate_r(size_t, struct hsearch_data *);
-void __hdestroy_r(struct hsearch_data *);
-int __hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *);
+static int __hcreate_r(size_t, struct hsearch_data *);
+static void __hdestroy_r(struct hsearch_data *);
+static int __hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *);
static size_t keyhash(char *k)
{
@@ -101,7 +101,7 @@ ENTRY *hsearch(ENTRY item, ACTION action)
return e;
}
-int __hcreate_r(size_t nel, struct hsearch_data *htab)
+static int __hcreate_r(size_t nel, struct hsearch_data *htab)
{
int r;
@@ -117,7 +117,7 @@ int __hcreate_r(size_t nel, struct hsearch_data *htab)
}
weak_alias(__hcreate_r, hcreate_r);
-void __hdestroy_r(struct hsearch_data *htab)
+static void __hdestroy_r(struct hsearch_data *htab)
{
if (htab->__tab) free(htab->__tab->entries);
free(htab->__tab);
@@ -125,7 +125,7 @@ void __hdestroy_r(struct hsearch_data *htab)
}
weak_alias(__hdestroy_r, hdestroy_r);
-int __hsearch_r(ENTRY item, ACTION action, ENTRY **retval, struct hsearch_data *htab)
+static int __hsearch_r(ENTRY item, ACTION action, ENTRY **retval, struct hsearch_data *htab)
{
size_t hash = keyhash(item.key);
ENTRY *e = lookup(item.key, hash, htab);