public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] 82550_eeprom: Fix error: lvalue required as increment operand
@ 2008-05-17 12:43 Jean-Christophe PLAGNIOL-VILLARD
  2008-05-17 17:48 ` Joakim Tjernlund
  2008-05-18 20:49 ` Wolfgang Denk
  0 siblings, 2 replies; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-05-17 12:43 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@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;
 }
 
 /* The EEPROM commands include the alway-set leading bit. */
-- 
1.5.5.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [PATCH] 82550_eeprom: Fix error: lvalue required as increment operand
  2008-05-17 12:43 [U-Boot-Users] [PATCH] 82550_eeprom: Fix error: lvalue required as increment operand Jean-Christophe PLAGNIOL-VILLARD
@ 2008-05-17 17:48 ` Joakim Tjernlund
  2008-05-18 20:50   ` Wolfgang Denk
  2008-05-18 20:49 ` Wolfgang Denk
  1 sibling, 1 reply; 4+ messages in thread
From: Joakim Tjernlund @ 2008-05-17 17:48 UTC (permalink / raw)
  To: u-boot

> -----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@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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [PATCH] 82550_eeprom: Fix error: lvalue required as increment operand
  2008-05-17 12:43 [U-Boot-Users] [PATCH] 82550_eeprom: Fix error: lvalue required as increment operand Jean-Christophe PLAGNIOL-VILLARD
  2008-05-17 17:48 ` Joakim Tjernlund
@ 2008-05-18 20:49 ` Wolfgang Denk
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2008-05-18 20:49 UTC (permalink / raw)
  To: u-boot

In message <1211028201-7152-1-git-send-email-plagnioj@jcrosoft.com> you wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
>  examples/82559_eeprom.c |   11 ++++++++---
>  1 files changed, 8 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Oh, that sound of male ego.  You travel halfway across the galaxy and
it's still the same song.
	-- Eve McHuron, "Mudd's Women", stardate 1330.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [PATCH] 82550_eeprom: Fix error: lvalue required as increment operand
  2008-05-17 17:48 ` Joakim Tjernlund
@ 2008-05-18 20:50   ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2008-05-18 20:50 UTC (permalink / raw)
  To: u-boot

In message <010901c8b846$32bb8230$98328690$@Tjernlund@transmode.se> you wrote:
>
> > +	return (void *)ret;
> 
> return dst;

Right. Thanks for catching.

Unapplied.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"There are three principal ways to lose money: wine, women,  and  en-
gineers.  While  the first two are more pleasant, the third is by far
the more certain."                      -- Baron Rothschild, ca. 1800

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-05-18 20:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-17 12:43 [U-Boot-Users] [PATCH] 82550_eeprom: Fix error: lvalue required as increment operand Jean-Christophe PLAGNIOL-VILLARD
2008-05-17 17:48 ` Joakim Tjernlund
2008-05-18 20:50   ` Wolfgang Denk
2008-05-18 20:49 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox