From: Dmitry V. Levin Date: Sat, 8 Jul 2017 14:57:44 +0000 (+0000) Subject: net: fix printing of struct linger's field names X-Git-Tag: v4.19~319 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6314e1d0f139964868acf5aa910a3e12d34e21e1;p=strace net: fix printing of struct linger's field names * net.c: Include "print_fields.h". (print_linger): Print fields of struct linger using PRINT_FIELD_D. --- diff --git a/net.c b/net.c index 807eb250..273edda0 100644 --- a/net.c +++ b/net.c @@ -30,6 +30,8 @@ */ #include "defs.h" +#include "print_fields.h" + #include #include #include @@ -497,9 +499,9 @@ print_linger(struct tcb *const tcp, const kernel_ulong_t addr, const int len) return; } - tprintf("{onoff=%d, linger=%d}", - linger.l_onoff, - linger.l_linger); + PRINT_FIELD_D("{", linger, l_onoff); + PRINT_FIELD_D(", ", linger, l_linger); + tprints("}"); } #ifdef SO_PEERCRED