[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] libihash: fix comparison between signed and unsigned int
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 2/3] libihash: fix comparison between signed and unsigned integer |
Date: |
Sun, 31 Aug 2014 16:31:04 +0200 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Sun 31 Aug 2014 16:25:00 +0200, a écrit :
> * libihash/ihash.h (HURD_IHASH_ITERATE): Fix comparison between signed
> and unsigned integer expressions.
Ack.
This only fixes a warning, not a bug, right?
> ---
> libihash/ihash.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libihash/ihash.h b/libihash/ihash.h
> index 345630d..849a55a 100644
> --- a/libihash/ihash.h
> +++ b/libihash/ihash.h
> @@ -241,7 +241,8 @@ hurd_ihash_value_t hurd_ihash_find (hurd_ihash_t ht,
> hurd_ihash_key_t key);
> for (hurd_ihash_value_t val,
> \
> *_hurd_ihash_valuep = (ht)->size ? &(ht)->items[0].value : 0;
> \
> (ht)->size \
> - && ((_hurd_ihash_item_t) _hurd_ihash_valuep) - &(ht)->items[0]
> \
> + && (size_t) ((_hurd_ihash_item_t) _hurd_ihash_valuep \
> + - &(ht)->items[0]) \
> < (ht)->size \
> && (val = *_hurd_ihash_valuep, 1); \
> _hurd_ihash_valuep = (hurd_ihash_value_t *) \
> --
> 2.1.0
>
--
Samuel
> [Linux] c'est une philosophie un art de vivre, un état intérieur,
> une sorte de fluide qui nous entoure et nous pénètre.
Fais tourner stp !
-+- Guillaume in Guide du linuxien pervers - "Tous drogués j'vous dis !"