mirror of https://github.com/mkerrisk/man-pages
process_vm_readv.2: Minor tweaks to example code
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
529b74009b
commit
9762bc8a64
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue