X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b83ad9c88af4715987015ddc91ac93ad749df428..680abdb047c1a66d3ccc14cad518117773c3cc8c:/include/xbt/str.h diff --git a/include/xbt/str.h b/include/xbt/str.h index 0f10bef8d0..c89cf9825c 100644 --- a/include/xbt/str.h +++ b/include/xbt/str.h @@ -55,11 +55,10 @@ static inline unsigned int xbt_str_hash_ext(const char *str, int str_len) { #ifdef XBT_DJB2_HASH_FUNCTION /* fast implementation of djb2 algorithm */ - int c; unsigned int hash = 5381; while (str_len--) { - c = *str++; + int c = *str++; hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ } # elif defined(XBT_FNV_HASH_FUNCTION)