* [PATCH iproute2 1/1] ip: initialize FILE pointer in ip-monitor
@ 2017-09-26 19:13 Roman Mashak
2017-09-27 7:36 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Roman Mashak @ 2017-09-26 19:13 UTC (permalink / raw)
To: stephen; +Cc: netdev, Roman Mashak
Since FILE *_fp was not explicitly initialized, all the consequent print_*()
calls were failing.
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
---
ip/ipmonitor.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ip/ipmonitor.c b/ip/ipmonitor.c
index 3171d47..f4d502a 100644
--- a/ip/ipmonitor.c
+++ b/ip/ipmonitor.c
@@ -284,6 +284,9 @@ int do_ipmonitor(int argc, char **argv)
if (lnsid) {
groups |= nl_mgrp(RTNLGRP_NSID);
}
+
+ new_json_obj(json, stdout);
+
if (file) {
FILE *fp;
int err;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iproute2 1/1] ip: initialize FILE pointer in ip-monitor
2017-09-26 19:13 [PATCH iproute2 1/1] ip: initialize FILE pointer in ip-monitor Roman Mashak
@ 2017-09-27 7:36 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2017-09-27 7:36 UTC (permalink / raw)
To: Roman Mashak; +Cc: netdev
On Tue, 26 Sep 2017 15:13:56 -0400
Roman Mashak <mrv@mojatatu.com> wrote:
> Since FILE *_fp was not explicitly initialized, all the consequent print_*()
> calls were failing.
>
> Signed-off-by: Roman Mashak <mrv@mojatatu.com>
This works, but the later patch by Julien Fortien which gets rid of the
FILE * argument all together is a cleaner solution. I will skip this
patch and apply that one.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-27 7:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-26 19:13 [PATCH iproute2 1/1] ip: initialize FILE pointer in ip-monitor Roman Mashak
2017-09-27 7:36 ` Stephen Hemminger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.