There's no need to check pre-validated input

elfHash and friends are used solely from do_translate, which already
checks for null strings. There's no need to do it again here.

Change-Id: I90a16d2623ca753a444e53952539001988568bdb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
bb10
João Abecasis 2012-03-27 13:01:28 +02:00 committed by Qt by Nokia
parent d5020b8913
commit 7a0793114b
1 changed files with 6 additions and 8 deletions

View File

@ -106,14 +106,12 @@ static void elfHash_continue(const char *name, uint &h)
const uchar *k;
uint g;
if (name) {
k = (const uchar *) name;
while (*k) {
h = (h << 4) + *k++;
if ((g = (h & 0xf0000000)) != 0)
h ^= g >> 24;
h &= ~g;
}
k = (const uchar *) name;
while (*k) {
h = (h << 4) + *k++;
if ((g = (h & 0xf0000000)) != 0)
h ^= g >> 24;
h &= ~g;
}
}