[U-Boot-Users] [PATCH] 82550_eeprom: Fix error: lvalue required as increment operand
Joakim Tjernlund
Joakim.Tjernlund at transmode.se
Sat May 17 19:48:21 CEST 2008
> -----Original Message-----
> From: u-boot-users-bounces at lists.sourceforge.net [mailto:u-boot-users-bounces at lists.sourceforge.net]
> On Behalf Of Jean-Christophe PLAGNIOL-VILLARD
> Sent: den 17 maj 2008 14:43
> To: u-boot-users at lists.sourceforge.net
> Subject: [U-Boot-Users] [PATCH] 82550_eeprom: Fix error: lvalue required as increment operand
>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> ---
> examples/82559_eeprom.c | 11 ++++++++---
> 1 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/examples/82559_eeprom.c b/examples/82559_eeprom.c
> index 1a121d4..a56edd4 100644
> --- a/examples/82559_eeprom.c
> +++ b/examples/82559_eeprom.c
> @@ -53,9 +53,14 @@ static inline unsigned short swap16(unsigned short x)
>
> static inline void *memcpy(void *dst, const void *src, unsigned int len)
> {
> - void * ret = dst;
> - while (len-- > 0) *((char *)dst)++ = *((char *)src)++;
> - return ret;
> + char * ret = dst;
> +
> + while (len-- > 0) {
> + *ret++ = *((char *)src);
> + src++;
> + }
> +
> + return (void *)ret;
return dst;
More information about the U-Boot
mailing list