[PATCH] purgatory: Fix memcmp for src address increment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 23, 2015 at 08:34:17AM +0530, Pratyush Anand wrote:
> src addresses are not being incremented, so only first byte is compared
> instead of first len bytes.
> 
> Signed-off-by: Pratyush Anand <panand at redhat.com>
> Acked-by: Geoff Levand <geoff at infradead.org>

Thanks, applied.

> ---
>  purgatory/string.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/purgatory/string.c b/purgatory/string.c
> index 4f35613ef751..f06c460b08f8 100644
> --- a/purgatory/string.c
> +++ b/purgatory/string.c
> @@ -46,6 +46,8 @@ int memcmp(void *src1, void *src2, size_t len)
>  		if (*s1 != *s2) {
>  			return *s2 - *s1;
>  		}
> +		s1++;
> +		s2++;
>  	}
>  	return 0;
>  	



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux