more type-punned pointers

R=rsc
http://codereview.appspot.com/376045
This commit is contained in:
Russ Cox 2010-03-10 14:59:03 -08:00
parent 0c9c620f39
commit 96898a8141
2 changed files with 3 additions and 3 deletions

View file

@ -83,6 +83,6 @@ recvfd(int s)
return -1;
}
cmsg = CMSG_FIRSTHDR(&msg);
fd = *(int*)CMSG_DATA(cmsg);
memmove(&fd, CMSG_DATA(cmsg), sizeof(int));
return fd;
}