]> granicus.if.org Git - strace/commitdiff
Lowercase SCNO_IN_RANGE and SCNO_IS_VALID
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 18 Dec 2016 17:12:27 +0000 (17:12 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 18 Dec 2016 22:57:57 +0000 (22:57 +0000)
* defs.h (SCNO_IN_RANGE): Rename to scno_in_range.  All callers updated.
(SCNO_IS_VALID): Rename to scno_is_valid.  All callers updated.

count.c
defs.h
linux/alpha/get_scno.c
linux/arm/get_scno.c
linux/mips/get_scno.c
syscall.c

diff --git a/count.c b/count.c
index d9d4b774d4a02a2b5975778264d98fd5dc7461a7..4b333bf3c01a3ab68ce89105323ce8821b22b6f6 100644 (file)
--- a/count.c
+++ b/count.c
@@ -53,14 +53,13 @@ count_syscall(struct tcb *tcp, const struct timeval *syscall_exiting_tv)
        struct timeval wtv;
        struct timeval *tv = &wtv;
        struct call_counts *cc;
-       unsigned long scno = tcp->scno;
 
-       if (!SCNO_IN_RANGE(scno))
+       if (!scno_in_range(tcp->scno))
                return;
 
        if (!counts)
                counts = xcalloc(nsyscalls, sizeof(*counts));
-       cc = &counts[scno];
+       cc = &counts[tcp->scno];
 
        cc->calls++;
        if (syserror(tcp))
diff --git a/defs.h b/defs.h
index 8cd4f9f6d4e0506908a34ed6c6ee46ee60d01aff..83f09f94305acb1a191ac880a03f3876a0f48f71 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -879,7 +879,7 @@ extern struct fault_opts *fault_vec[SUPPORTED_PERSONALITIES];
 
 /* Checks that sysent[scno] is not out of range. */
 static inline bool
-SCNO_IN_RANGE(unsigned long scno)
+scno_in_range(unsigned long scno)
 {
        return scno < nsyscalls;
 }
@@ -890,9 +890,9 @@ SCNO_IN_RANGE(unsigned long scno)
  * and its sysent[scno].sys_flags has no TRACE_INDIRECT_SUBCALL flag set.
  */
 static inline bool
-SCNO_IS_VALID(unsigned long scno)
+scno_is_valid(unsigned long scno)
 {
-       return SCNO_IN_RANGE(scno)
+       return scno_in_range(scno)
               && sysent[scno].sys_func
               && !(sysent[scno].sys_flags & TRACE_INDIRECT_SUBCALL);
 }
index fc099216fbe4bd68512077ac72ea0c92e2ac4eef..65b9a77d0c8f6a90cc146e5ab6f9e62e4a179295 100644 (file)
@@ -13,7 +13,7 @@ arch_get_scno(struct tcb *tcp)
         * Do some sanity checks to figure out if it's
         * really a syscall entry
         */
-       if (!SCNO_IN_RANGE(scno)) {
+       if (!scno_in_range(scno)) {
                if (alpha_a3 == 0 || alpha_a3 == -1) {
                        if (debug_flag)
                                error_msg("stray syscall exit: r0 = %ld", scno);
index 23a167c83b53841af6dfc670c19ab63e151deee7..4dced92a7b8ab3f486834fa0f18b3c869b508262 100644 (file)
@@ -72,7 +72,7 @@ arch_get_scno(struct tcb *tcp)
         * Do some sanity checks to figure out
         * whether it's really a syscall entry.
         */
-       if (arm_regs.ARM_ip && !SCNO_IN_RANGE(scno)) {
+       if (arm_regs.ARM_ip && !scno_in_range(scno)) {
                if (debug_flag)
                        error_msg("pid %d stray syscall exit:"
                                  " ARM_ip = %ld, scno = %ld",
index f9b5e7d710ed56e8bfcebba0dab2b84ede5520d5..9364f8173c31007714fd6df07dd4ea5b1c687df5 100644 (file)
@@ -4,7 +4,7 @@ arch_get_scno(struct tcb *tcp)
 {
        tcp->scno = mips_REG_V0;
 
-       if (!SCNO_IN_RANGE(tcp->scno)) {
+       if (!scno_in_range(tcp->scno)) {
                if (mips_REG_A3 == 0 || mips_REG_A3 == (uint64_t) -1) {
                        if (debug_flag)
                                error_msg("stray syscall exit: v0 = %ld",
index d76c4a167c3545e74def5181b2cb10f896faee9a..2b30f58c4b8c458d4277a6d81c70cd7b730bf374 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -407,7 +407,7 @@ decode_ipc_subcall(struct tcb *tcp)
 static void
 decode_mips_subcall(struct tcb *tcp)
 {
-       if (!SCNO_IS_VALID(tcp->u_arg[0]))
+       if (!scno_is_valid(tcp->u_arg[0]))
                return;
        tcp->scno = tcp->u_arg[0];
        tcp->qual_flg = qual_flags(tcp->scno);
@@ -553,7 +553,7 @@ struct fault_opts *fault_vec[SUPPORTED_PERSONALITIES];
 static struct fault_opts *
 tcb_fault_opts(struct tcb *tcp)
 {
-       return (SCNO_IN_RANGE(tcp->scno) && tcp->fault_vec[current_personality])
+       return (scno_in_range(tcp->scno) && tcp->fault_vec[current_personality])
               ? &tcp->fault_vec[current_personality][tcp->scno] : NULL;
 }
 
@@ -1213,7 +1213,7 @@ get_scno(struct tcb *tcp)
        if (rc != 1)
                return rc;
 
-       if (SCNO_IS_VALID(tcp->scno)) {
+       if (scno_is_valid(tcp->scno)) {
                tcp->s_ent = &sysent[tcp->scno];
                tcp->qual_flg = qual_flags(tcp->scno);
        } else {
@@ -1278,5 +1278,5 @@ syscall_name(long scno)
        if (current_personality == X32_PERSONALITY_NUMBER)
                scno &= ~__X32_SYSCALL_BIT;
 #endif
-       return SCNO_IS_VALID(scno) ? sysent[scno].sys_name: NULL;
+       return scno_is_valid(scno) ? sysent[scno].sys_name: NULL;
 }