summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Syromyatnikov <evgsyr@gmail.com>2021-12-06 14:02:03 +0100
committerDmitry V. Levin <ldv@strace.io>2022-01-09 08:00:00 +0000
commit667fe9a58354990450ff09a5a78b1e009ab41863 (patch)
treea90c51b440f10ec249ffffb97c1368a006df51db
parente8ab74f770ba00bbbbd002f9117b4da0f17d0fcd (diff)
downloadstrace-667fe9a58354990450ff09a5a78b1e009ab41863.tar.gz
net: remove PACKET_STATISTICS #ifdef guards
The constant is always defined since v5.15~139 "xlat: add fallback values to sock_packet_options", and the decoder function does not require any extra definitions, so the #fidef guards are now superficial. * src/net.c [!PACKET_STATISTICS] (print_tpacket_stats): Make available. [!PACKET_STATISTICS] (print_getsockopt) <case SOL_PACKET: case PACKET_STATISTICS>: Call print_tpacket_stats. Complements: v5.15~139 "xlat: add fallback values to sock_packet_options"
-rw-r--r--src/net.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/net.c b/src/net.c
index 5357ec0fb..d6f87a725 100644
--- a/src/net.c
+++ b/src/net.c
@@ -725,7 +725,6 @@ print_get_error(struct tcb *const tcp, const kernel_ulong_t addr,
tprint_indirect_end();
}
-#ifdef PACKET_STATISTICS
static void
print_tpacket_stats(struct tcb *const tcp, const kernel_ulong_t addr,
unsigned int len)
@@ -752,7 +751,6 @@ print_tpacket_stats(struct tcb *const tcp, const kernel_ulong_t addr,
stats, tp_freeze_q_cnt, len, PRINT_FIELD_U);
tprint_struct_end();
}
-#endif /* PACKET_STATISTICS */
#include "xlat/icmpfilterflags.h"
@@ -822,11 +820,9 @@ print_getsockopt(struct tcb *const tcp, const unsigned int level,
case SOL_PACKET:
switch (name) {
-#ifdef PACKET_STATISTICS
case PACKET_STATISTICS:
print_tpacket_stats(tcp, addr, rlen);
return;
-#endif
}
break;