Fix format strings for Windows.

Windows doesn't like %zd, so cast (s)size_t to int. Also, some shorts were
incorrectly printed with %d instead of %hd.
This commit is contained in:
Guus Sliepen 2011-06-03 00:46:56 +02:00
parent 3ade33bfac
commit 5989a29d7b
3 changed files with 5 additions and 5 deletions

View file

@ -456,7 +456,7 @@ static void handle_meta_write(int sock, short events, void *data) {
ssize_t outlen = send(c->socket, c->outbuf.data + c->outbuf.offset, c->outbuf.len - c->outbuf.offset, 0);
if(outlen <= 0) {
logger(LOG_ERR, "Onoes, outlen = %zd (%s)", outlen, strerror(errno));
logger(LOG_ERR, "Onoes, outlen = %d (%s)", (int)outlen, strerror(errno));
terminate_connection(c, c->status.active);
return;
}