http: use sizeof() instead of direct constant use
@@ -58,12 +58,12 @@ int trace_receive_req_header(struct pt_regs *ctx) {
// Extract the Header Name
bpf_usdt_readarg(3, ctx, &pos);
bpf_usdt_readarg(4, ctx, &line.header_name_len);
- bpf_probe_read(&line.header_name, MAX_STR_LEN, pos);
+ bpf_probe_read(&line.header_name, sizeof(line.header_name), pos);
// Extract the Header Value
bpf_usdt_readarg(5, ctx, &pos);
bpf_usdt_readarg(6, ctx, &line.header_value_len);
- bpf_probe_read(&line.header_value, MAX_STR_LEN, pos);
+ bpf_probe_read(&line.header_value, sizeof(line.header_value), pos);
if (rxbuf.perf_submit(ctx, &line, sizeof(line)) < 0)
bpf_trace_printk("failed to perf_submit\\n");
