Skip to content

Commit

Permalink
Fix invalid memset call
Browse files Browse the repository at this point in the history
Also reformat another memset call, for consistency.

Closes #170
  • Loading branch information
mgerhardy authored and bombela committed May 4, 2020
1 parent cc475eb commit 738e3c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backward.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ class StackTraceImpl<system_tag::current_tag> : public StackTraceImplHolder {
HANDLE process = GetCurrentProcess();

STACKFRAME64 s;
memset(&s, 0, sizeof(STACKFRAME64));
memset(&s, 0, sizeof (STACKFRAME64));

// TODO: 32 bit context capture
s.AddrStack.Mode = AddrModeFlat;
Expand Down Expand Up @@ -3352,7 +3352,7 @@ template <> class TraceResolverImpl<system_tag::windows_tag> {

char name[256];

memset(&sym, sizeof(sym), 0);
memset(&sym, 0, sizeof sym);
sym.sym.SizeOfStruct = sizeof(SYMBOL_INFO);
sym.sym.MaxNameLen = max_sym_len;

Expand Down

0 comments on commit 738e3c6

Please sign in to comment.