Changes in boot/generic/src/memstr.c [45f7449:1715b7fe] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/generic/src/memstr.c
r45f7449 r1715b7fe 30 30 #include <typedefs.h> 31 31 32 /** Move memory block without overlapping.32 /** Copy block of memory. 33 33 * 34 * Copy cnt bytes from src address to dst address. The source35 * and destinationmemory areas cannot overlap.34 * Copy cnt bytes from src address to dst address.The source and destination 35 * memory areas cannot overlap. 36 36 * 37 * @param src Source address to copy from. 37 38 * @param dst Destination address to copy to. 38 * @param src Source address to copy from.39 39 * @param cnt Number of bytes to copy. 40 40 * … … 44 44 void *memcpy(void *dst, const void *src, size_t cnt) 45 45 { 46 uint8_t *dp = (uint8_t *) dst; 47 const uint8_t *sp = (uint8_t *) src; 48 49 while (cnt-- != 0) 50 *dp++ = *sp++; 51 52 return dst; 46 return __builtin_memcpy(dst, src, cnt); 53 47 } 54 48 … … 66 60 void *memset(void *dst, int val, size_t cnt) 67 61 { 68 uint8_t *dp = (uint8_t *) dst; 69 70 while (cnt-- != 0) 71 *dp++ = val; 72 73 return dst; 62 return __builtin_memset(dst, val, cnt); 74 63 } 75 64
Note:
See TracChangeset
for help on using the changeset viewer.