system/core
修订版 | 96c9bdfc0f05bacbc1dd6e40c361a7f5a6aefd98 (tree) |
---|---|
时间 | 2015-12-22 11:59:30 |
作者 | Andreas Gampe <agampe@goog...> |
Commiter | Chih-Wei Huang |
System/core: Use memmove
Should use memmove when you expect overlap.
Change-Id: I268a173db40a4be54232958e37aa8a03c2a885ee
@@ -430,7 +430,7 @@ bool String8::removeAll(const char* other) { | ||
430 | 430 | next = len; |
431 | 431 | } |
432 | 432 | |
433 | - memcpy(buf + tail, buf + index + skip, next - index - skip); | |
433 | + memmove(buf + tail, buf + index + skip, next - index - skip); | |
434 | 434 | tail += next - index - skip; |
435 | 435 | index = next; |
436 | 436 | } |