From nobody Mon Apr 29 15:40:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1554730843182652.6664949164206; Mon, 8 Apr 2019 06:40:43 -0700 (PDT) Received: from localhost ([127.0.0.1]:53316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDUVe-0002lO-Jq for importer@patchew.org; Mon, 08 Apr 2019 09:40:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDUUm-0002SC-UO for qemu-devel@nongnu.org; Mon, 08 Apr 2019 09:39:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hDUUe-0000AV-UF for qemu-devel@nongnu.org; Mon, 08 Apr 2019 09:39:29 -0400 Received: from smtpproxy19.qq.com ([184.105.206.84]:51187) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hDUUb-00005D-IP for qemu-devel@nongnu.org; Mon, 08 Apr 2019 09:39:22 -0400 Received: from localhost.localdomain (unknown [117.32.216.84]) by esmtp6.qq.com (ESMTP) with id ; Mon, 08 Apr 2019 21:39:05 +0800 (CST) X-QQ-mid: bizesmtp22t1554730746tfk8xpip X-QQ-SSF: A1100000002000508550000A0000000 X-QQ-FEAT: Tp2hW+Mew+dY834xQ3/jsddr0CA6a7tcSjPdj9umDKJAXMdcZhWA7x1fhWvl1 toyUTJqE04Pa/oJ8hM22n5EA2BpukC9LzVU5wHgUmFE1RRj6QRWh7eWkaDY4ABJgvbISGy1 1ipVlJkIbl47yjkqtwa/gmDqiBBMEEeLD25VfPKxwpv5lGd1k74l9rxB+Ba+OQ+hYbNohfb XEBjREjvmmU4AUwr8as7KUegPyNlWMUX3zsTdNz7cc/4awH09gW7eu3yniVafEjc6N/shrC lUPblKjZlKarkg0yFpeDGLmw7dmjOHPzixU7Z7dawWcSIK X-QQ-GoodBg: 0 From: ghorges To: qemu-devel@nongnu.org Date: Mon, 8 Apr 2019 21:38:54 +0800 Message-Id: <20190408133854.25737-1-ghorges@xiyoulinux.org> X-Mailer: git-send-email 2.17.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:xiyoulinux.org:qybgforeign:qybgforeign4 X-QQ-Bgrelay: 1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 184.105.206.84 Subject: [Qemu-devel] [PATCH] Wshadow in qemu/linux-user/syscall.c:Changed some variable names X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ghorges <1298394633@qq.com>, riku.voipio@iki.fi, laurent@vivier.eu, ghorges Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: ghorges <1298394633@qq.com> Signed-off-by: ghorges --- linux-user/syscall.c | 66 ++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 208fd1813d..985095e4d5 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8240,7 +8240,7 @@ static abi_long do_syscall1(void *cpu_env, int num, a= bi_long arg1, size_t size; } sig, *sig_ptr; =20 - abi_ulong arg_sigset, arg_sigsize, *arg7; + abi_ulong arg_sigset, arg_sigsize, *arg7s; target_sigset_t *target_sigset; =20 n =3D arg1; @@ -8280,13 +8280,13 @@ static abi_long do_syscall1(void *cpu_env, int num,= abi_long arg1, sig_ptr =3D &sig; sig.size =3D SIGSET_T_SIZE; =20 - arg7 =3D lock_user(VERIFY_READ, arg6, sizeof(*arg7) * 2, 1= ); - if (!arg7) { + arg7s =3D lock_user(VERIFY_READ, arg6, sizeof(*arg7s) * 2,= 1); + if (!arg7s) { return -TARGET_EFAULT; } - arg_sigset =3D tswapal(arg7[0]); - arg_sigsize =3D tswapal(arg7[1]); - unlock_user(arg7, arg6, 0); + arg_sigset =3D tswapal(arg7s[0]); + arg_sigsize =3D tswapal(arg7s[1]); + unlock_user(arg7s, arg6, 0); =20 if (arg_sigset) { sig.set =3D &set; @@ -9479,14 +9479,14 @@ static abi_long do_syscall1(void *cpu_env, int num,= abi_long arg1, } case TARGET_NR_getcpu: { - unsigned cpu, node; - ret =3D get_errno(sys_getcpu(arg1 ? &cpu : NULL, + unsigned cpus, node; + ret =3D get_errno(sys_getcpu(arg1 ? &cpus : NULL, arg2 ? &node : NULL, NULL)); if (is_error(ret)) { return ret; } - if (arg1 && put_user_u32(cpu, arg1)) { + if (arg1 && put_user_u32(cpus, arg1)) { return -TARGET_EFAULT; } if (arg2 && put_user_u32(node, arg2)) { @@ -10649,24 +10649,24 @@ static abi_long do_syscall1(void *cpu_env, int nu= m, abi_long arg1, case TARGET_NR_listxattr: case TARGET_NR_llistxattr: { - void *p, *b =3D 0; + void *q, *b =3D 0; if (arg2) { b =3D lock_user(VERIFY_WRITE, arg2, arg3, 0); if (!b) { return -TARGET_EFAULT; } } - p =3D lock_user_string(arg1); - if (p) { + q =3D lock_user_string(arg1); + if (q) { if (num =3D=3D TARGET_NR_listxattr) { - ret =3D get_errno(listxattr(p, b, arg3)); + ret =3D get_errno(listxattr(q, b, arg3)); } else { - ret =3D get_errno(llistxattr(p, b, arg3)); + ret =3D get_errno(llistxattr(q, b, arg3)); } } else { ret =3D -TARGET_EFAULT; } - unlock_user(p, arg1, 0); + unlock_user(q, arg1, 0); unlock_user(b, arg2, arg3); return ret; } @@ -10686,25 +10686,25 @@ static abi_long do_syscall1(void *cpu_env, int nu= m, abi_long arg1, case TARGET_NR_setxattr: case TARGET_NR_lsetxattr: { - void *p, *n, *v =3D 0; + void *q, *n, *v =3D 0; if (arg3) { v =3D lock_user(VERIFY_READ, arg3, arg4, 1); if (!v) { return -TARGET_EFAULT; } } - p =3D lock_user_string(arg1); + q =3D lock_user_string(arg1); n =3D lock_user_string(arg2); - if (p && n) { + if (q && n) { if (num =3D=3D TARGET_NR_setxattr) { - ret =3D get_errno(setxattr(p, n, v, arg4, arg5)); + ret =3D get_errno(setxattr(q, n, v, arg4, arg5)); } else { - ret =3D get_errno(lsetxattr(p, n, v, arg4, arg5)); + ret =3D get_errno(lsetxattr(q, n, v, arg4, arg5)); } } else { ret =3D -TARGET_EFAULT; } - unlock_user(p, arg1, 0); + unlock_user(q, arg1, 0); unlock_user(n, arg2, 0); unlock_user(v, arg3, 0); } @@ -10731,25 +10731,25 @@ static abi_long do_syscall1(void *cpu_env, int nu= m, abi_long arg1, case TARGET_NR_getxattr: case TARGET_NR_lgetxattr: { - void *p, *n, *v =3D 0; + void *q, *n, *v =3D 0; if (arg3) { v =3D lock_user(VERIFY_WRITE, arg3, arg4, 0); if (!v) { return -TARGET_EFAULT; } } - p =3D lock_user_string(arg1); + q =3D lock_user_string(arg1); n =3D lock_user_string(arg2); - if (p && n) { + if (q && n) { if (num =3D=3D TARGET_NR_getxattr) { - ret =3D get_errno(getxattr(p, n, v, arg4)); + ret =3D get_errno(getxattr(q, n, v, arg4)); } else { - ret =3D get_errno(lgetxattr(p, n, v, arg4)); + ret =3D get_errno(lgetxattr(q, n, v, arg4)); } } else { ret =3D -TARGET_EFAULT; } - unlock_user(p, arg1, 0); + unlock_user(q, arg1, 0); unlock_user(n, arg2, 0); unlock_user(v, arg3, arg4); } @@ -10776,19 +10776,19 @@ static abi_long do_syscall1(void *cpu_env, int nu= m, abi_long arg1, case TARGET_NR_removexattr: case TARGET_NR_lremovexattr: { - void *p, *n; - p =3D lock_user_string(arg1); + void *q, *n; + q =3D lock_user_string(arg1); n =3D lock_user_string(arg2); - if (p && n) { + if (q && n) { if (num =3D=3D TARGET_NR_removexattr) { - ret =3D get_errno(removexattr(p, n)); + ret =3D get_errno(removexattr(q, n)); } else { - ret =3D get_errno(lremovexattr(p, n)); + ret =3D get_errno(lremovexattr(q, n)); } } else { ret =3D -TARGET_EFAULT; } - unlock_user(p, arg1, 0); + unlock_user(q, arg1, 0); unlock_user(n, arg2, 0); } return ret; --=20 2.17.0