From: Marko Kreen Date: Fri, 2 Jan 2009 13:23:56 +0000 (+0000) Subject: minor cleanups X-Git-Tag: pgbouncer_1_3_rc1~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=25ebbfd5afa196090c3c28c60e2abb0e15ad33cf;p=pgbouncer minor cleanups - avoid use of non-const fmt string - avoid duplicate def of sbuf_len --- 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 */