Skip to content

Commit 23a7aea

Browse files
DerDakonkees
authored andcommitted
ELF uapi: add spaces before '{'
When searching for a struct definition I often enough end up simply doing git grep 'struct foobar {' Sadly some of the ELF structs did not follow the usual coding style so they were invisible. Signed-off-by: Rolf Eike Beer <[email protected]> Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent af4fddf commit 23a7aea

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

include/uapi/linux/elf.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ typedef __s64 Elf64_Sxword;
140140
#define ELF64_ST_BIND(x) ELF_ST_BIND(x)
141141
#define ELF64_ST_TYPE(x) ELF_ST_TYPE(x)
142142

143-
typedef struct dynamic{
143+
typedef struct dynamic {
144144
Elf32_Sword d_tag;
145-
union{
145+
union {
146146
Elf32_Sword d_val;
147147
Elf32_Addr d_ptr;
148148
} d_un;
@@ -173,7 +173,7 @@ typedef struct elf64_rel {
173173
Elf64_Xword r_info; /* index and type of relocation */
174174
} Elf64_Rel;
175175

176-
typedef struct elf32_rela{
176+
typedef struct elf32_rela {
177177
Elf32_Addr r_offset;
178178
Elf32_Word r_info;
179179
Elf32_Sword r_addend;
@@ -185,7 +185,7 @@ typedef struct elf64_rela {
185185
Elf64_Sxword r_addend; /* Constant addend used to compute value */
186186
} Elf64_Rela;
187187

188-
typedef struct elf32_sym{
188+
typedef struct elf32_sym {
189189
Elf32_Word st_name;
190190
Elf32_Addr st_value;
191191
Elf32_Word st_size;
@@ -206,7 +206,7 @@ typedef struct elf64_sym {
206206

207207
#define EI_NIDENT 16
208208

209-
typedef struct elf32_hdr{
209+
typedef struct elf32_hdr {
210210
unsigned char e_ident[EI_NIDENT];
211211
Elf32_Half e_type;
212212
Elf32_Half e_machine;
@@ -246,7 +246,7 @@ typedef struct elf64_hdr {
246246
#define PF_W 0x2
247247
#define PF_X 0x1
248248

249-
typedef struct elf32_phdr{
249+
typedef struct elf32_phdr {
250250
Elf32_Word p_type;
251251
Elf32_Off p_offset;
252252
Elf32_Addr p_vaddr;

0 commit comments

Comments
 (0)