This reverts commit 664dcf4217c4fc08cc43c050419fea8181d81ef1.
This commit causes format warnings while compilation:
proto_nlmsg.c:45:10: warning: format ‘%d’ expects argument of type
‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
tprintf(", Len %d\n", RTA_LEN(attr));
^
Seems like RTA_LEN has 'long' type while calculation of:
RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0))
I checked it by print sizeof of RTA_LEN and it was 8.
Signed-off-by: Vadim Kochan <[email protected]>
---
proto_nlmsg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/proto_nlmsg.c b/proto_nlmsg.c
index d3c913d..ce97c6d 100644
--- a/proto_nlmsg.c
+++ b/proto_nlmsg.c
@@ -42,7 +42,7 @@
#define attr_fmt(attr, fmt, ...) \
tprintf("\tA: "fmt, ##__VA_ARGS__); \
- tprintf(", Len %d\n", RTA_LEN(attr));
+ tprintf(", Len %lu\n", RTA_LEN(attr));
struct flag_name {
const char *name;
--
2.6.2
--
You received this message because you are subscribed to the Google Groups
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.