diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-01-29 08:25:15 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-01-29 08:25:15 +0000 |
commit | 92f120d446433f74d4d2612587bb38a992050a04 (patch) | |
tree | 3cbab71124841be7472ab55114b9123fd54a9038 /misc/hsearch_r.c | |
parent | fa8d436c87f156d18208df3819fecee9fc1dbd9e (diff) | |
download | glibc-92f120d446433f74d4d2612587bb38a992050a04.zip glibc-92f120d446433f74d4d2612587bb38a992050a04.tar.gz glibc-92f120d446433f74d4d2612587bb38a992050a04.tar.bz2 |
Update.
2002-01-29 Ulrich Drepper <drepper@redhat.com>
* misc/hsearch_r.c (hsearch_r): Don't insert anything if entry is
found.
* misc/Makefile (tests): Add tst-hsearch.
* misc/tst-hsearch.c: New file.
Diffstat (limited to 'misc/hsearch_r.c')
-rw-r--r-- | misc/hsearch_r.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/misc/hsearch_r.c b/misc/hsearch_r.c index 59964eb..a7629a5 100644 --- a/misc/hsearch_r.c +++ b/misc/hsearch_r.c @@ -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; } |