Re: [Nagios-devel] [PATCH] nagios: Changed return code on exit call

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] [PATCH] nagios: Changed return code on exit call

Post by Guest »

On 11/28/2012 08:15 PM, Ricardo Jose Maraschini wrote:
>
> From: Ricardo Maraschini
>
> Changed exit return code from ERROR to EXIT_FAILURE in order to avoid
> warnings on compilers that have strict type-value checking rules.
>

Applied. Thanks. And thanks for providing such an excellently formatted
patch.

> Signed-off-by: Ricardo Maraschini
>
> ---
> base/nagios.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/base/nagios.c b/base/nagios.c
> index e711bb5..a5603bc 100644
> --- a/base/nagios.c
> +++ b/base/nagios.c
> @@ -478,7 +478,7 @@ int main(int argc, char **argv, char **env) {
> logit(NSLOG_PROCESS_INFO | NSLOG_RUNTIME_ERROR | NSLOG_CONFIG_ERROR, TRUE, "Failed to drop privileges. Aborting.");
>
> cleanup();
> - exit(ERROR);
> + exit(EXIT_FAILURE);
> }
>
> #ifdef USE_EVENT_BROKER
>


--
Andreas Ericsson andreas.ericsson@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.





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: ae@op5.se
Locked