From 09a1a5a2caeb6277e1cd9c697064ee1f0b3e7589 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Mon, 14 Sep 2015 23:02:29 +0000 Subject: [PATCH] Rename umove_long_or_printaddr to umove_ulong_or_printaddr Rename the recently added function to reflect what kind of data type it actually deals with: unsigned long int, without sign extension. * defs.h (umove_long_or_printaddr): Rename to umove_ulong_or_printaddr, chage 3rd argument to unsigned long *. * util.c (umove_long_or_printaddr): Likewise. * aio.c (sys_io_submit): Update callers. --- aio.c | 4 ++-- defs.h | 2 +- util.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aio.c b/aio.c index f8c73358..e9d36e3c 100644 --- a/aio.c +++ b/aio.c @@ -164,13 +164,13 @@ SYS_FUNC(io_submit) long iocbs = tcp->u_arg[2]; for (i = 0; i < nr; ++i, iocbs += current_wordsize) { - long iocbp; + unsigned long iocbp; struct iocb cb; if (i) tprints(", "); - if (umove_long_or_printaddr(tcp, iocbs, &iocbp)) { + if (umove_ulong_or_printaddr(tcp, iocbs, &iocbp)) { /* * No point in trying to read the whole array * because nr can be ridiculously large. diff --git a/defs.h b/defs.h index 102dedf3..8833dfc8 100644 --- a/defs.h +++ b/defs.h @@ -541,7 +541,7 @@ extern int umoven(struct tcb *, long, unsigned int, void *); extern int umoven_or_printaddr(struct tcb *, long, unsigned int, void *); #define umove_or_printaddr(pid, addr, objp) \ umoven_or_printaddr((pid), (addr), sizeof(*(objp)), (void *) (objp)) -extern int umove_long_or_printaddr(struct tcb *, long, long *); +extern int umove_ulong_or_printaddr(struct tcb *, long, unsigned long *); extern int umovestr(struct tcb *, long, unsigned int, char *); extern int upeek(int pid, long, long *); diff --git a/util.c b/util.c index d40eafc2..afd298ec 100644 --- a/util.c +++ b/util.c @@ -1133,7 +1133,7 @@ umoven_or_printaddr(struct tcb *tcp, const long addr, const unsigned int len, } int -umove_long_or_printaddr(struct tcb *tcp, const long addr, long *ptr) +umove_ulong_or_printaddr(struct tcb *tcp, const long addr, unsigned long *ptr) { if (current_wordsize < sizeof(*ptr)) { uint32_t val32; -- 2.50.1