mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-12-23 18:25:27 +00:00
Stop calling memmove when unnecessary
BUG=chromium:450137 R=mark@chromium.org git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1416 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
7bebb27fb4
commit
cfaf27c37e
|
@ -282,8 +282,10 @@ bool LinuxPtraceDumper::ThreadsSuspend() {
|
|||
// If the thread either disappeared before we could attach to it, or if
|
||||
// it was part of the seccomp sandbox's trusted code, it is OK to
|
||||
// silently drop it from the minidump.
|
||||
my_memmove(&threads_[i], &threads_[i+1],
|
||||
(threads_.size() - i - 1) * sizeof(threads_[i]));
|
||||
if (i < threads_.size() - 1) {
|
||||
my_memmove(&threads_[i], &threads_[i + 1],
|
||||
(threads_.size() - i - 1) * sizeof(threads_[i]));
|
||||
}
|
||||
threads_.resize(threads_.size() - 1);
|
||||
--i;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue