diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-03-07 00:51:44 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-03-07 00:51:44 +0100 |
commit | c5bdf653b5e4beac837a50a1ab77bb81bdca2275 (patch) | |
tree | 4ad6c2dbaa39206ee1320951283353a8f1f9f7d5 /src/target/firmware/lib | |
parent | a5927b650359997a10924befa9d9741bc55153b4 (diff) |
remove cons_memcpy(), as memcpy() is now fixed
Diffstat (limited to 'src/target/firmware/lib')
-rw-r--r-- | src/target/firmware/lib/console.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/target/firmware/lib/console.c b/src/target/firmware/lib/console.c index f7d0226e..2ec028a0 100644 --- a/src/target/firmware/lib/console.c +++ b/src/target/firmware/lib/console.c @@ -114,31 +114,19 @@ int cons_rb_flush(void) return __rb_flush(); } -static void cons_memcpy(char *pos, const char *data, int len) -{ -#if 0 - /* Somehow our memcpy is broken !?! */ - memcpy(pos, data, len); -#else - int i; - for (i = 0; i < len; i++) - *pos++ = *data++; -#endif -} - /* Append bytes to ring buffer, not more than we have left! */ static void __cons_rb_append(const char *data, int len) { if (cons.next_inbyte + len >= &cons.buf[0]+sizeof(cons.buf)) { int before_tail = (&cons.buf[0]+sizeof(cons.buf)) - cons.next_inbyte; /* copy the first part before we wrap */ - cons_memcpy(cons.next_inbyte, data, before_tail); + memcpy(cons.next_inbyte, data, before_tail); data += before_tail; len -= before_tail; /* reset the buffer */ cons.next_inbyte = &cons.buf[0]; } - cons_memcpy(cons.next_inbyte, data, len); + memcpy(cons.next_inbyte, data, len); cons.next_inbyte += len; } |