]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - misc/hsearch_r.c
update from main archive
[thirdparty/glibc.git] / misc / hsearch_r.c
index 151bb31efc37f80c057a6ac99cbba7207da26ffd..95813e4bfb484c7cd652ab26a5a22eded167b19a 100644 (file)
@@ -70,7 +70,7 @@ hcreate_r (nel, htab)
   /* Test for correct arguments.  */
   if (htab == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return 0;
     }
 
@@ -105,7 +105,7 @@ hdestroy_r (htab)
   /* Test for correct arguments.  */
   if (htab == NULL)
     {
-      errno = EINVAL;
+      __set_errno (EINVAL);
       return;
     }
 
@@ -147,7 +147,7 @@ hsearch_r (item, action, retval, htab)
      error.  */
   if (action == ENTER && htab->filled == htab->size)
     {
-      errno = ENOMEM;
+      __set_errno (ENOMEM);
       *retval = NULL;
       return 0;
     }
@@ -222,7 +222,7 @@ hsearch_r (item, action, retval, htab)
       return 1;
     }
 
-  errno = ESRCH;
+  __set_errno (ESRCH);
   *retval = NULL;
   return 0;
 }