]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(hsearch_r): Don't insert anything if entry is found.
authorUlrich Drepper <drepper@redhat.com>
Tue, 29 Jan 2002 08:24:59 +0000 (08:24 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 29 Jan 2002 08:24:59 +0000 (08:24 +0000)
misc/hsearch_r.c

index 59964eb0ad433d00efda7ac79ad3e09f23465e71..a7629a5da4d8d24620e8c2124c399b4a64782b6d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1993.
 
@@ -168,9 +168,6 @@ hsearch_r (item, action, retval, htab)
       if (htab->table[idx].used == hval
          && strcmp (item.key, htab->table[idx].entry.key) == 0)
        {
-          if (action == ENTER)
-           htab->table[idx].entry.data = item.data;
-
          *retval = &htab->table[idx].entry;
          return 1;
        }
@@ -195,9 +192,6 @@ hsearch_r (item, action, retval, htab)
           if (htab->table[idx].used == hval
              && strcmp (item.key, htab->table[idx].entry.key) == 0)
            {
-              if (action == ENTER)
-               htab->table[idx].entry.data = item.data;
-
              *retval = &htab->table[idx].entry;
              return 1;
            }