1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-13 18:30:27 +00:00

Fix format string in error path: didn't print strerror(errno)

This commit is contained in:
Florian Westphal 2007-12-13 01:05:01 +00:00
parent 8974e90552
commit 4715ccf9ca

View File

@ -17,7 +17,7 @@
#include "portab.h" #include "portab.h"
#include "io.h" #include "io.h"
static char UNUSED id[] = "$Id: conn.c,v 1.218 2007/12/07 21:19:01 fw Exp $"; static char UNUSED id[] = "$Id: conn.c,v 1.219 2007/12/13 01:05:01 fw Exp $";
#include "imp.h" #include "imp.h"
#include <assert.h> #include <assert.h>
@ -1394,7 +1394,7 @@ New_Server( int Server , struct in_addr *dest)
InitSinaddr(&local_addr, 0); InitSinaddr(&local_addr, 0);
local_addr.sin_addr = Conf_Server[Server].bind_addr; local_addr.sin_addr = Conf_Server[Server].bind_addr;
if (bind(new_sock, (struct sockaddr *)&local_addr, (socklen_t)sizeof(local_addr))) if (bind(new_sock, (struct sockaddr *)&local_addr, (socklen_t)sizeof(local_addr)))
Log(LOG_WARNING, "Can't bind socket to %s!", Conf_ListenAddress, strerror( errno )); Log(LOG_WARNING, "Can't bind socket to %s: %s!", Conf_ListenAddress, strerror( errno ));
res = connect(new_sock, (struct sockaddr *)&new_addr, res = connect(new_sock, (struct sockaddr *)&new_addr,
(socklen_t)sizeof(new_addr)); (socklen_t)sizeof(new_addr));