* sock.c (decode_ifconf): Always print ifc_len, don't judge ifc_buf.
---
 sock.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/sock.c b/sock.c
index 3e197ed..1c87927 100644
--- a/sock.c
+++ b/sock.c
@@ -140,24 +140,19 @@ decode_ifconf(struct tcb *tcp, const long addr)
                tprints(", ");
                if (umove_or_printaddr(tcp, addr, &ifc))
                        return RVAL_DECODED | 1;
-               if (ifc.ifc_buf) {
-                       tprints("{");
-                       print_ifc_len(ifc.ifc_len);
-               }
+               tprints("{");
+               print_ifc_len(ifc.ifc_len);
                return 1;
        }
 
        if (syserror(tcp) || umove(tcp, addr, &ifc) < 0) {
-               if (ifc.ifc_buf)
-                       tprints("}");
-               else
-                       printaddr(addr);
+               tprints(", ");
+               printaddr(addr);
+               tprints("}");
                return RVAL_DECODED | 1;
        }
 
        if (!ifc.ifc_buf) {
-               tprints("{");
-               print_ifc_len(ifc.ifc_len);
                tprints(", NULL}");
                return RVAL_DECODED | 1;
        }
-- 
2.7.4


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to