Mercurial > noffle
comparison src/client.c @ 74:c7df2cc65cc1 noffle
[svn] Introduce UNUSED(x) macro
author | bears |
---|---|
date | Sat, 13 May 2000 16:36:35 +0100 |
parents | 6aa3a8eff5a9 |
children | 1fcdced0246e |
comparison
equal
deleted
inserted
replaced
73:c874bd3c4bb8 | 74:c7df2cc65cc1 |
---|---|
1 /* | 1 /* |
2 client.c | 2 client.c |
3 | 3 |
4 $Id: client.c 77 2000-05-13 10:53:48Z enz $ | 4 $Id: client.c 80 2000-05-13 15:36:35Z bears $ |
5 */ | 5 */ |
6 | 6 |
7 #if HAVE_CONFIG_H | 7 #if HAVE_CONFIG_H |
8 #include <config.h> | 8 #include <config.h> |
9 #endif | 9 #endif |
224 } | 224 } |
225 | 225 |
226 static void | 226 static void |
227 connectAlarm( int sig ) | 227 connectAlarm( int sig ) |
228 { | 228 { |
229 UNUSED( sig ); | |
230 | |
229 return; | 231 return; |
230 } | 232 } |
231 | 233 |
232 static sig_t | 234 static sig_t |
233 installSignalHandler( int sig, sig_t handler ) | 235 installSignalHandler( int sig, sig_t handler ) |
258 { | 260 { |
259 Log_err( "client.c:connectWithTimeout: signal failed." ); | 261 Log_err( "client.c:connectWithTimeout: signal failed." ); |
260 return FALSE; | 262 return FALSE; |
261 } | 263 } |
262 to = Cfg_connectTimeout(); | 264 to = Cfg_connectTimeout(); |
263 if ( alarm( to ) != 0 ) | 265 if ( alarm( ( unsigned int ) to ) != 0 ) |
264 Log_err( "client.c:connectWithTimeout: Alarm was already set." ); | 266 Log_err( "client.c:connectWithTimeout: Alarm was already set." ); |
265 r = connect( sock, servAddr, addrLen ); | 267 r = connect( sock, servAddr, addrLen ); |
266 alarm( 0 ); | 268 alarm( 0 ); |
267 installSignalHandler( SIGALRM, oldHandler ); | 269 installSignalHandler( SIGALRM, oldHandler ); |
268 return ( r >= 0 ); | 270 return ( r >= 0 ); |