mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
rtld: reindent and style(9) elf_hash()
In preparation for an upcoming change (D39517).
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 87443cb6c6
)
This commit is contained in:
parent
47af8281c5
commit
937d152b3e
|
@ -1843,17 +1843,17 @@ donelist_check(DoneList *dlp, const Obj_Entry *obj)
|
|||
unsigned long
|
||||
elf_hash(const char *name)
|
||||
{
|
||||
const unsigned char *p = (const unsigned char *) name;
|
||||
unsigned long h = 0;
|
||||
unsigned long g;
|
||||
const unsigned char *p = (const unsigned char *)name;
|
||||
unsigned long h = 0;
|
||||
unsigned long g;
|
||||
|
||||
while (*p != '\0') {
|
||||
h = (h << 4) + *p++;
|
||||
if ((g = h & 0xf0000000) != 0)
|
||||
h ^= g >> 24;
|
||||
h &= ~g;
|
||||
}
|
||||
return (h);
|
||||
while (*p != '\0') {
|
||||
h = (h << 4) + *p++;
|
||||
if ((g = h & 0xf0000000) != 0)
|
||||
h ^= g >> 24;
|
||||
h &= ~g;
|
||||
}
|
||||
return (h);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue