[prev in list] [next in list] [prev in thread] [next in thread]
List: strace
Subject: [PATCH 2/4] sock: fix decode_ifconf print error
From: JingPiao Chen <chenjingpiao () gmail ! com>
Date: 2016-12-27 3:43:29
Message-ID: 1482810211-17147-2-git-send-email-chenjingpiao () gmail ! com
[Download RAW message or body]
* 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic