Skip to content

Commit 7641049

Browse files
committed
Minor code clean up of the nlist abstraction
1 parent 583b7e7 commit 7641049

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/parser/file/macho/macho_parser_nlist.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* CallstackLibrary - Library creating human-readable call stacks.
33
*
4-
* Copyright (C) 2024 mhahnFr
4+
* Copyright (C) 2024 - 2025 mhahnFr
55
*
66
* This file is part of the CallstackLibrary.
77
*
@@ -30,7 +30,7 @@
3030
#include <macho/macho_utils.h>
3131

3232
/**
33-
* Represents a unified version of the `nlist` structure.
33+
* Represents a unified version of the @c nlist structure.
3434
*/
3535
struct macho_parser_nlist {
3636
/** The index into the string table. */
@@ -50,10 +50,11 @@ struct macho_parser_nlist {
5050
*
5151
* @param pointer the pointer to the real nlist entry
5252
* @param bit64 whether the binary is 64 bit encoded
53-
* @param bytesSwapped whether the byte order needs to be swapped to match the host byte order
53+
* @param bytesSwapped whether the byte order needs to be swapped to match the
54+
* host byte order
5455
* @return the translated and unified nlist entry
5556
*/
56-
static inline struct macho_parser_nlist macho_parser_nlist_from(const void* pointer, bool bit64, bool bytesSwapped) {
57+
static inline struct macho_parser_nlist macho_parser_nlist_from(const void* pointer, const bool bit64, const bool bytesSwapped) {
5758
struct macho_parser_nlist toReturn;
5859
if (bit64) {
5960
const struct nlist_64* real = pointer;
@@ -85,7 +86,7 @@ static inline struct macho_parser_nlist macho_parser_nlist_from(const void* poin
8586
* @param bit64 whether the 64 bit version is used
8687
* @return the size in bytes of the real nlist structure used
8788
*/
88-
static inline size_t macho_parser_nlist_sizeof(bool bit64) {
89+
static inline size_t macho_parser_nlist_sizeof(const bool bit64) {
8990
return bit64 ? sizeof(struct nlist_64) : sizeof(struct nlist);
9091
}
9192

0 commit comments

Comments
 (0)