commit - 84a599ece472c4f2ef6d2f553addf898e0ed73f9
commit + 3a3b3225d42ede7a062fa5e4403a7f445baf518b
blob - 142cf23a012592332ae6096ae72a093423e98c95
blob + 07f26f319ca2a4ff8a646202d7e2d001fe5c2408
--- src/ngircd/conn.c
+++ src/ngircd/conn.c
af = ng_ipaddr_af(&addr);
sock = socket(af, SOCK_STREAM, 0);
- if( sock < 0 ) {
- Log(LOG_CRIT, "Can't create socket (af %d) : %s!", af, strerror(errno));
+ if (sock < 0) {
+ Log(LOG_CRIT, "Can't create socket (af %d) : %s!", af,
+ strerror(errno));
return -1;
}
if (bind(sock, (struct sockaddr *)&addr, ng_ipaddr_salen(&addr)) != 0) {
Log(LOG_CRIT, "Can't bind socket to address %s:%d - %s!",
- ng_ipaddr_tostr(&addr), Port, strerror(errno));
+ ng_ipaddr_tostr(&addr), Port, strerror(errno));
close(sock);
return -1;
}
- if( listen( sock, 10 ) != 0 ) {
- Log( LOG_CRIT, "Can't listen on socket: %s!", strerror( errno ));
- close( sock );
+ if (listen(sock, 10) != 0) {
+ Log(LOG_CRIT, "Can't listen on socket: %s!", strerror(errno));
+ close(sock);
return -1;
}
/* keep fd in list so we can close it when ngircd restarts/shuts down */
- if (!array_catb( &My_Listeners,(char*) &sock, sizeof(int) )) {
- Log( LOG_CRIT, "Can't add socket to My_Listeners array: %s!", strerror( errno ));
- close( sock );
+ if (!array_catb(&My_Listeners, (char *)&sock, sizeof(int))) {
+ Log(LOG_CRIT, "Can't add socket to My_Listeners array: %s!",
+ strerror(errno));
+ close(sock);
return -1;
}