[PATCH] schedule_new_event() returns a pointer to a timed_event structure
Andreas Ericsson
ae at op5.se
Mon Jun 25 09:40:26 CEST 2012
On 06/22/2012 07:59 PM, Ricardo Maraschini wrote:
> Hello,
>
> Please attempt to fix below, maybe we gonna have some problems ahead
> :-) During Nagios compilation I've received the following warning:
>
> commands.c: In function ‘cmd_signal_process’: commands.c:2000:9:
> warning: assignment makes integer from pointer without a cast
> [enabled by default]
>
> Looking to the code, schedule_new_event() returns a pointer to a
> timed_event structure or NULL in case of errors during malloc. As
> cmd_signal_process() returns an integer, i've made a patch to analyse
> the return of schedule_new_event() and give the appropriate return
> code(ERROR || OK).
>
> As I've also seen, we are using cmd_signal_process() only once, and
> it's inside commands.c. The funny thing is that we don't check for
> return code when we call it :-)
>
Rghto. This looks sensible. I'll apply it straight-away.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
More information about the Developers
mailing list