process_vm_readv.2: Minor tweaks to example code

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2012-03-20 09:36:56 +13:00
parent 529b74009b
commit 9762bc8a64
1 changed files with 3 additions and 2 deletions

View File

@ -241,7 +241,8 @@ and the second 10 bytes into
.nf
#include <sys/uio.h>
int main()
int
main(void)
{
struct iovec local[2];
struct iovec remote[1];
@ -254,7 +255,7 @@ int main()
local[0].iov_len = 10;
local[1].iov_base = buf2;
local[1].iov_len = 10;
remote[0].iov_base = (void *)0x10000;
remote[0].iov_base = (void *) 0x10000;
remote[1].iov_len = 20;
nread = process_vm_readv(pid, local, 2, remote, 1, 0);