From: Travis Cross Date: Tue, 8 May 2012 18:13:07 +0000 (+0000) Subject: mod_posix_timer: comply with gcc -pedantic X-Git-Tag: v1.2.0~494 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c728efdbb987834f8d76dac51132d0a724380902;p=thirdparty%2Ffreeswitch.git mod_posix_timer: comply with gcc -pedantic Thanks to Thierry Panthier for pointing this out. --- diff --git a/src/mod/timers/mod_posix_timer/mod_posix_timer.c b/src/mod/timers/mod_posix_timer/mod_posix_timer.c index 04d694b5f7..c170d8fa20 100644 --- a/src/mod/timers/mod_posix_timer/mod_posix_timer.c +++ b/src/mod/timers/mod_posix_timer/mod_posix_timer.c @@ -111,7 +111,9 @@ static void timer_signal_handler(int sig, siginfo_t *si, void *cu) if (val >= 0 && val <= MAX_ACTIVE_TIMERS) { uint8_t active_id = (uint8_t)val; /* notify runtime thread that timer identified by active_id has ticked */ - write(globals.timer_tick_pipe[1], &active_id, 1); + if (write(globals.timer_tick_pipe[1], &active_id, 1) == -1) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error writing to pipe: %s\n", strerror(errno)); + } } } }