diff options
author | Alexander Monakov <amonakov@ispras.ru> | 2015-06-28 02:48:30 +0300 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-06-27 21:48:19 -0400 |
commit | 66d45787c865a1807ae397a89a14699394ed4fa4 (patch) | |
tree | 630a28753ddddafcdcbce2dd54b4dff120f384ec /src | |
parent | 6ba5517a460c6c438f64d69464fdfc3269a4c91a (diff) | |
download | musl-66d45787c865a1807ae397a89a14699394ed4fa4.tar.gz musl-66d45787c865a1807ae397a89a14699394ed4fa4.tar.bz2 musl-66d45787c865a1807ae397a89a14699394ed4fa4.tar.xz musl-66d45787c865a1807ae397a89a14699394ed4fa4.zip |
dynlink.c: use a faster expression in gnu_hash
With -Os, GCC uses a multiply rather than a shift and addition for 'h*33'.
Use a more efficient expression explicitely.
Diffstat (limited to 'src')
-rw-r--r-- | src/ldso/dynlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index d2a72492..ec96be16 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -156,7 +156,7 @@ static uint32_t gnu_hash(const char *s0) const unsigned char *s = (void *)s0; uint_fast32_t h = 5381; for (; *s; s++) - h = h*33 + *s; + h += h*32 + *s; return h; } |