bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH 27/29] device/net_io.c (net_getstat): cast arguments to memcp


From: Samuel Thibault
Subject: Re: [PATCH 27/29] device/net_io.c (net_getstat): cast arguments to memcpy()
Date: Tue, 10 Dec 2013 00:55:12 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Marin Ramesa, le Mon 09 Dec 2013 23:57:42 +0100, a écrit :
> * device/net_io.c (net_getstat) (memcpy) (status): Cast to (void *).
> (net_getstat) (memcpy) (if_address): Likewise.
> (net_getstat) (memcpy) (addr_byte_count): Cast to size_t.

Ditto.

> ---
>  device/net_io.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/device/net_io.c b/device/net_io.c
> index f437340..74c053c 100644
> --- a/device/net_io.c
> +++ b/device/net_io.c
> @@ -1417,7 +1417,7 @@ printf ("net_getstat: count: %d, addr_int_count: %d\n",
>                   return (D_INVALID_OPERATION);
>               }
>  
> -             memcpy(status, ifp->if_address, addr_byte_count);
> +             memcpy((void *)status, (void *)ifp->if_address, 
> (size_t)addr_byte_count);
>               if (addr_byte_count < addr_int_count * sizeof(int))
>                   memset((char *)status + addr_byte_count, 0, 
>                         (addr_int_count * sizeof(int)
> -- 
> 1.8.1.4
> 
> 

-- 
Samuel
/*
 * Oops. The kernel tried to access some bad page. We'll have to
 * terminate things with extreme prejudice.
*/
die_if_kernel("Oops", regs, error_code);
(From linux/arch/i386/mm/fault.c)                                  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]