From: Armin Novak Date: Fri, 8 Feb 2019 08:15:04 +0000 (+0100) Subject: Fixed NULL argument warning. X-Git-Tag: 2.0.0~495^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e605a1092137d1c93988d1394c6e2901da132a28;p=platform%2Fupstream%2Ffreerdp.git Fixed NULL argument warning. --- diff --git a/winpr/libwinpr/synch/timer.c b/winpr/libwinpr/synch/timer.c index 7034c94..0d453d6 100644 --- a/winpr/libwinpr/synch/timer.c +++ b/winpr/libwinpr/synch/timer.c @@ -179,6 +179,7 @@ static void WaitableTimerHandler(void* arg) static void WaitableTimerSignalHandler(int signum, siginfo_t* siginfo, void* arg) { WINPR_TIMER* timer = siginfo->si_value.sival_ptr; + WINPR_UNUSED(arg); if (!timer || (signum != SIGALRM)) return; @@ -327,7 +328,10 @@ HANDLE CreateWaitableTimerA(LPSECURITY_ATTRIBUTES lpTimerAttributes, BOOL bManua timer->pfnCompletionRoutine = NULL; timer->lpArgToCompletionRoutine = NULL; timer->bInit = FALSE; - timer->name = strdup(lpTimerName); + + if (lpTimerName) + timer->name = strdup(lpTimerName); + timer->ops = &ops; #if defined(__APPLE__)