From 6314e1d0f139964868acf5aa910a3e12d34e21e1 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sat, 8 Jul 2017 14:57:44 +0000 Subject: [PATCH] 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. --- net.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 -- 2.50.1