Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Apr 2023 16:49:28 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 87443cb6c669 - main - rtld: reindent and style(9) elf_hash()
Message-ID:  <202304121649.33CGnS5g016772@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304121649.33CGnS5g016772>