Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ptrace.c: Fix the size on some memsets.

  • Loading branch information...
commit 4b15af80e20d2eb363eda58bc3b45ee050c487bd 1 parent 6c5d231
@nelhage authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 ptrace.c
View
4 ptrace.c
@@ -75,7 +75,7 @@ static long __ptrace_command(struct ptrace_child *child, enum __ptrace_request r
#endif
int ptrace_attach_child(struct ptrace_child *child, pid_t pid) {
- memset(child, 0, sizeof child);
+ memset(child, 0, sizeof *child);
child->pid = pid;
if (ptrace_command(child, PTRACE_ATTACH) < 0)
return -1;
@@ -84,7 +84,7 @@ int ptrace_attach_child(struct ptrace_child *child, pid_t pid) {
}
int ptrace_finish_attach(struct ptrace_child *child, pid_t pid) {
- memset(child, 0, sizeof child);
+ memset(child, 0, sizeof *child);
child->pid = pid;
kill(pid, SIGCONT);
Please sign in to comment.
Something went wrong with that request. Please try again.