[Oisf-devel] [PATCH 1/1] Prelude: fix test always returning true
Victor Julien
victor at inliniac.net
Fri Jun 3 12:04:20 UTC 2011
On 06/02/2011 03:49 PM, Pierre Chifflier wrote:
> Add missing parenthesis to fix test in error handling code.
>
> Signed-off-by: Pierre Chifflier <chifflier at wzdftpd.net>
> ---
> src/alert-prelude.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/alert-prelude.c b/src/alert-prelude.c
> index f04821e..3ed0171 100644
> --- a/src/alert-prelude.c
> +++ b/src/alert-prelude.c
> @@ -329,7 +329,7 @@ static int EventToSourceTarget(Packet *p, idmef_alert_t *alert)
> SCReturnInt(ret);
>
> ret = idmef_target_new_service(target, &service);
> - if ( ! ret < 0 )
> + if ( !(ret < 0) )
> SCReturnInt(ret);
>
> if ( p->tcph || p->udph )
This code is supposed to detect idmef_target_new_service failure. With
your patch we assume that a return code >= 0 means failure. Is that correct?
--
---------------------------------------------
Victor Julien
http://www.inliniac.net/
PGP: http://www.inliniac.net/victorjulien.asc
---------------------------------------------
More information about the Oisf-devel
mailing list