From 0f78390bd799fc0b0394240a9a704591481ac8c6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 9 Aug 2001 05:21:51 +0000 Subject: Update. * locale/elem-hash.h (elem_hash): Correct stupid mistake and create real hash values now. Patch by Isamu Hasegawa . * libio/iofgetpos.c (_IO_new_fgetpos): Correct a few problems in the handling of wide streams. --- locale/elem-hash.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'locale/elem-hash.h') diff --git a/locale/elem-hash.h b/locale/elem-hash.h index f68e764..9efe8d1 100644 --- a/locale/elem-hash.h +++ b/locale/elem-hash.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper, . @@ -24,10 +24,10 @@ elem_hash (const char *str, int_fast32_t n) { int32_t result = n; - while (n > 0) + while (n-- > 0) { - n <<= 3; - n += *str++; + result <<= 3; + result += *str++; } return result; -- cgit v1.1