diff --git a/elfio/elf_types.hpp b/elfio/elf_types.hpp index c4f6b47..b1b225d 100644 --- a/elfio/elf_types.hpp +++ b/elfio/elf_types.hpp @@ -1213,10 +1213,10 @@ struct Elf64_Sym }; #define ELF_ST_BIND( i ) ( ( i ) >> 4 ) -#define ELF_ST_TYPE( i ) ( (i)&0xf ) -#define ELF_ST_INFO( b, t ) ( ( ( b ) << 4 ) + ( (t)&0xf ) ) +#define ELF_ST_TYPE( i ) ( ( i ) & 0xf ) +#define ELF_ST_INFO( b, t ) ( ( ( b ) << 4 ) + ( ( t ) & 0xf ) ) -#define ELF_ST_VISIBILITY( o ) ( (o)&0x3 ) +#define ELF_ST_VISIBILITY( o ) ( ( o ) & 0x3 ) // Relocation entries struct Elf32_Rel @@ -1250,9 +1250,9 @@ struct Elf64_Rela #define ELF32_R_INFO( s, t ) ( ( ( s ) << 8 ) + (unsigned char)( t ) ) #define ELF64_R_SYM( i ) ( ( i ) >> 32 ) -#define ELF64_R_TYPE( i ) ( (i)&0xffffffffL ) +#define ELF64_R_TYPE( i ) ( ( i ) & 0xffffffffL ) #define ELF64_R_INFO( s, t ) \ - ( ( ( (int64_t)( s ) ) << 32 ) + ( (t)&0xffffffffL ) ) + ( ( ( (int64_t)( s ) ) << 32 ) + ( ( t ) & 0xffffffffL ) ) // Dynamic structure struct Elf32_Dyn