]> granicus.if.org Git - strace/commitdiff
desc: change tracee address type from long to kernel_ureg_t
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 22 Dec 2016 23:23:55 +0000 (23:23 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 25 Dec 2016 11:32:45 +0000 (11:32 +0000)
* desc.c (decode_select): Rename arg to addr, change its type
from long to kernel_ureg_t.

desc.c

diff --git a/desc.c b/desc.c
index d6d50eefd5e123ae78b7cac746d0c89b71e7e46b..1870224e852ea2ddee4811cd17999684c85addc5 100644 (file)
--- a/desc.c
+++ b/desc.c
@@ -77,9 +77,9 @@ decode_select(struct tcb *const tcp, const kernel_ureg_t *const args,
        int nfds, fdsize;
        fd_set *fds = NULL;
        const char *sep;
-       long arg;
+       kernel_ureg_t addr;
 
-       /* Kernel truncates arg[0] to int, we do the same. */
+       /* Kernel truncates args[0] to int, we do the same. */
        nfds = (int) args[0];
 
        /* Kernel rejects negative nfds, so we don't parse it either. */
@@ -102,13 +102,13 @@ decode_select(struct tcb *const tcp, const kernel_ureg_t *const args,
                if (verbose(tcp) && fdsize > 0)
                        fds = malloc(fdsize);
                for (i = 0; i < 3; i++) {
-                       arg = args[i+1];
+                       addr = args[i+1];
                        tprints(", ");
                        if (!fds) {
-                               printaddr(arg);
+                               printaddr(addr);
                                continue;
                        }
-                       if (umoven_or_printaddr(tcp, arg, fdsize, fds))
+                       if (umoven_or_printaddr(tcp, addr, fdsize, fds))
                                continue;
                        tprints("[");
                        for (j = 0, sep = "";; j++) {
@@ -146,8 +146,8 @@ decode_select(struct tcb *const tcp, const kernel_ureg_t *const args,
                for (i = 0; i < 3 && ready_fds > 0; i++) {
                        int first = 1;
 
-                       arg = args[i+1];
-                       if (!arg || !fds || umoven(tcp, arg, fdsize, fds) < 0)
+                       addr = args[i+1];
+                       if (!addr || !fds || umoven(tcp, addr, fdsize, fds) < 0)
                                continue;
                        for (j = 0;; j++) {
                                j = next_set_bit(fds, j, nfds);