]> git.sur5r.net Git - u-boot/blobdiff - examples/eepro100_eeprom.c
NAND: Properly create JFFS2 cleanmarkers.
[u-boot] / examples / eepro100_eeprom.c
index 60b937ef8de5092c7a6cc98d25af96d8d4bc8988..2b15d05adbb287c988899bc2ad09a3e0cbbc935b 100644 (file)
@@ -17,8 +17,9 @@
  * and release the resulting code under the GPL.
  */
 
-#define _PPC_STRING_H_         /* avoid unnecessary str/mem functions */
-#define _LINUX_STRING_H_       /* avoid unnecessary str/mem functions */
+/* avoid unnecessary memcpy function */
+#define __HAVE_ARCH_MEMCPY
+#define _PPC_STRING_H_
 
 #include <common.h>
 #include <exports.h>
@@ -78,9 +79,12 @@ static inline short inw(long addr)
 
 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. */