Fix some nits raised by Timur for r1385.

R=ivanpe@chromium.org

Review URL: https://breakpad.appspot.com/1734002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1387 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
thestig@chromium.org 2014-09-24 18:44:38 +00:00
parent df3257f5cb
commit 75690d56b2

View File

@ -149,9 +149,8 @@ void InstallAlternateStackLocked() {
// one is too small.
if (sys_sigaltstack(NULL, &old_stack) == -1 || !old_stack.ss_sp ||
old_stack.ss_size < kSigStackSize) {
new_stack.ss_sp = malloc(kSigStackSize);
new_stack.ss_sp = calloc(1, kSigStackSize);
new_stack.ss_size = kSigStackSize;
memset(new_stack.ss_sp, 0, kSigStackSize);
if (sys_sigaltstack(&new_stack, NULL) == -1) {
free(new_stack.ss_sp);
@ -188,7 +187,7 @@ void RestoreAlternateStackLocked() {
stack_installed = false;
}
// The global exception handler stack. This is need because there may exist
// The global exception handler stack. This is needed because there may exist
// multiple ExceptionHandler instances in a process. Each will have itself
// registered in this stack.
std::vector<ExceptionHandler*>* g_handler_stack_ = NULL;