bcc: remove trailing semicolon of macro
authorJacky_Yin <jjyyg1123@gmail.com>
Wed, 24 Nov 2021 07:56:23 +0000 (15:56 +0800)
committeryonghong-song <ys114321@gmail.com>
Wed, 24 Nov 2021 17:59:50 +0000 (09:59 -0800)
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.

src/cc/export/helpers.h

index cc80cf0c6b08b71c614e27c8d9682435940bf6f7..79c00b6144ec864e92be2b9a6be8e0dcf6eec2c6 100644 (file)
@@ -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
 )********"