From: Ferry Huberts Date: Fri, 6 Nov 2015 15:06:53 +0000 (+0100) Subject: parser: clean up invocation of olsr_exit X-Git-Tag: v0.9.5~719 X-Git-Url: http://olsr.org/git/?p=olsrd.git;a=commitdiff_plain;h=05b1dd06a87f44d92b1b3df89d0a19db953beb0f;ds=sidebyside parser: clean up invocation of olsr_exit olsr_exit already prints the message Signed-off-by: Ferry Huberts --- 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;