Skip to content

Commit

Permalink
bcc: remove trailing semicolon of macro
Browse files Browse the repository at this point in the history
The trailing semicolon of a do-while style macro will cause
a if-else condition without braces failed to compile.
Meanwhile, also align with other do-while style macros.
  • Loading branch information
JackyYin authored and yonghong-song committed Nov 24, 2021
1 parent 91a7983 commit 2949f5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cc/export/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1347,20 +1347,20 @@ static int ____##name(unsigned long long *ctx, ##args)
do { \
unsigned short __offset = args->data_loc_##field & 0xFFFF; \
bpf_probe_read((void *)dst, length, (char *)args + __offset); \
} while (0);
} while (0)

#define TP_DATA_LOC_READ(dst, field) \
do { \
unsigned short __offset = args->data_loc_##field & 0xFFFF; \
unsigned short __length = args->data_loc_##field >> 16; \
bpf_probe_read((void *)dst, __length, (char *)args + __offset); \
} while (0);
} while (0)

#define TP_DATA_LOC_READ_STR(dst, field, length) \
do { \
unsigned short __offset = args->data_loc_##field & 0xFFFF; \
bpf_probe_read_str((void *)dst, length, (char *)args + __offset); \
} while (0);
} while (0)

#endif
)********"

0 comments on commit 2949f5a

Please sign in to comment.