From: Ulrich Drepper Date: Tue, 29 Jan 2002 08:24:59 +0000 (+0000) Subject: (hsearch_r): Don't insert anything if entry is found. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5219e142084495710396a0a378dcafafd97146ef;p=thirdparty%2Fglibc.git (hsearch_r): Don't insert anything if entry is found. --- diff --git a/misc/hsearch_r.c b/misc/hsearch_r.c index 59964eb0ad4..a7629a5da4d 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 , 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; }