From 25ebbfd5afa196090c3c28c60e2abb0e15ad33cf Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Fri, 2 Jan 2009 13:23:56 +0000 Subject: [PATCH] minor cleanups - avoid use of non-const fmt string - avoid duplicate def of sbuf_len --- include/bouncer.h | 3 ++- include/iobuf.h | 2 -- src/main.c | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/bouncer.h b/include/bouncer.h index 87a5a6c..d4a8c90 100644 --- a/include/bouncer.h +++ b/include/bouncer.h @@ -66,6 +66,8 @@ typedef struct PgAddr PgAddr; typedef enum SocketState SocketState; typedef struct PktHdr PktHdr; +extern int cf_sbuf_len; + #include "aatree.h" #include "hash.h" #include "util.h" @@ -346,7 +348,6 @@ extern int cf_shutdown; extern int cf_reboot; extern int cf_sbuf_loopcnt; -extern int cf_sbuf_len; extern int cf_tcp_keepalive; extern int cf_tcp_keepcnt; extern int cf_tcp_keepidle; diff --git a/include/iobuf.h b/include/iobuf.h index 04424ad..7a62217 100644 --- a/include/iobuf.h +++ b/include/iobuf.h @@ -39,8 +39,6 @@ * send_pending(); */ -extern int cf_sbuf_len; - /* * 0 .. done_pos -- sent * done_pos .. parse_pos -- parsed, to send diff --git a/src/main.c b/src/main.c index 9472176..7bb15ce 100644 --- a/src/main.c +++ b/src/main.c @@ -534,10 +534,10 @@ static void write_pidfile(void) fd = open(cf_pidfile, O_WRONLY | O_CREAT | O_EXCL, 0644); if (fd < 0) - fatal_perror(cf_pidfile); + fatal_perror("%s", cf_pidfile); res = safe_write(fd, buf, strlen(buf)); if (res < 0) - fatal_perror(cf_pidfile); + fatal_perror("%s", cf_pidfile); close(fd); /* only remove when we have it actually written */ -- 2.40.0