From 05b1dd06a87f44d92b1b3df89d0a19db953beb0f Mon Sep 17 00:00:00 2001 From: Ferry Huberts Date: Fri, 6 Nov 2015 16:06:53 +0100 Subject: [PATCH] parser: clean up invocation of olsr_exit olsr_exit already prints the message Signed-off-by: Ferry Huberts --- src/parser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/parser.c b/src/parser.c index 47e49071..0dd01d63 100644 --- a/src/parser.c +++ b/src/parser.c @@ -535,8 +535,9 @@ olsr_input_hostemu(int fd, void *data __attribute__ ((unused)), unsigned int fla /* Extract size */ if ((cc = recv(fd, (void *)&pcklen, 2, MSG_PEEK)) != 2) { /* Win needs a cast */ if (cc <= 0) { - fprintf(stderr, "Lost olsr_switch connection - exit!\n"); - olsr_exit(__func__, EXIT_FAILURE); + char buf[1024]; + snprintf(buf, sizeof(buf), "%s: Lost olsr_switch connection", __func__); + olsr_exit(buf, EXIT_FAILURE); } fprintf(stderr, "[hust-emu] error extracting size(%d) %s!\n", cc, strerror(errno)); return; -- 2.20.1