Permalink
Browse files

ptrace.c: Fix the size on some memsets.

  • Loading branch information...
nelhage committed Apr 15, 2011
1 parent 6c5d231 commit 4b15af80e20d2eb363eda58bc3b45ee050c487bd
Showing with 2 additions and 2 deletions.
  1. +2 −2 ptrace.c
View
@@ -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);

0 comments on commit 4b15af8

Please sign in to comment.