git: 87443cb6c669 - main - rtld: reindent and style(9) elf_hash()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 12 Apr 2023 16:49:28 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=87443cb6c669b51ceaa7f85db63191374477efc1
commit 87443cb6c669b51ceaa7f85db63191374477efc1
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-04-12 15:06:14 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-04-12 16:43:36 +0000
rtld: reindent and style(9) elf_hash()
In preparation for an upcoming change (D39517).
Sponsored by: The FreeBSD Foundation
---
libexec/rtld-elf/rtld.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 7e4df3392ec7..382b05191a81 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -1802,17 +1802,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;
-
- while (*p != '\0') {
- h = (h << 4) + *p++;
- if ((g = h & 0xf0000000) != 0)
- h ^= g >> 24;
- h &= ~g;
- }
- return (h);
+ 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);
}
/*