[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] [RFC v2 5/9] net/net: fix local variable shadowing in net_client_init
- To: qemu-devel@xxxxxxxxxx
- From: Vladimir Sementsov-Ogievskiy <vsementsov@xxxxxxxxxxxxx>
- Date: Mon, 23 Sep 2019 19:12:27 +0300
- Cc: stefanha@xxxxxxxxxx, codyprime@xxxxxxxxx, jan.kiszka@xxxxxxxxxxx, eblake@xxxxxxxxxx, berto@xxxxxxxxxx, zhang.zhanghailiang@xxxxxxxxxx, qemu-block@xxxxxxxxxx, arikalo@xxxxxxxxxxxx, pasic@xxxxxxxxxxxxx, hpoussin@xxxxxxxxxxx, anthony.perard@xxxxxxxxxx, samuel.thibault@xxxxxxxxxxxx, philmd@xxxxxxxxxx, green@xxxxxxxxxxxxxx, lvivier@xxxxxxxxxx, ehabkost@xxxxxxxxxx, xiechanglong.d@xxxxxxxxx, pl@xxxxxxx, dgilbert@xxxxxxxxxx, b.galvani@xxxxxxxxx, eric.auger@xxxxxxxxxx, alex.williamson@xxxxxxxxxx, ronniesahlberg@xxxxxxxxx, jsnow@xxxxxxxxxx, rth@xxxxxxxxxxx, kwolf@xxxxxxxxxx, vsementsov@xxxxxxxxxxxxx, andrew@xxxxxxxx, crwulff@xxxxxxxxx, sundeep.lkml@xxxxxxxxx, michael@xxxxxxxx, qemu-ppc@xxxxxxxxxx, kbastian@xxxxxxxxxxxxxxxxxxxxx, imammedo@xxxxxxxxxx, fam@xxxxxxxxxx, peter.maydell@xxxxxxxxxx, sheepdog@xxxxxxxxxxxxxx, david@xxxxxxxxxx, palmer@xxxxxxxxxx, thuth@xxxxxxxxxx, jcmvbkbc@xxxxxxxxx, den@xxxxxxxxxx, hare@xxxxxxxx, sstabellini@xxxxxxxxxx, arei.gonglei@xxxxxxxxxx, marcel.apfelbaum@xxxxxxxxx, namei.unix@xxxxxxxxx, atar4qemu@xxxxxxxxx, farman@xxxxxxxxxxxxx, amit@xxxxxxxxxx, sw@xxxxxxxxxxx, groug@xxxxxxxx, qemu-s390x@xxxxxxxxxx, qemu-arm@xxxxxxxxxx, peter.chubb@xxxxxxxxxxxx, clg@xxxxxxxx, shorne@xxxxxxxxx, qemu-riscv@xxxxxxxxxx, cohuck@xxxxxxxxxx, amarkovic@xxxxxxxxxxxx, aurelien@xxxxxxxxxxx, pburton@xxxxxxxxxxxx, sagark@xxxxxxxxxxxxxxxxx, jasowang@xxxxxxxxxx, kraxel@xxxxxxxxxx, edgar.iglesias@xxxxxxxxx, gxt@xxxxxxxxxxxxxxx, ari@xxxxxxxxxx, quintela@xxxxxxxxxx, mdroth@xxxxxxxxxxxxxxxxxx, lersek@xxxxxxxxxx, borntraeger@xxxxxxxxxx, antonynpavlov@xxxxxxxxx, dillaman@xxxxxxxxxx, joel@xxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, integration@xxxxxxxxxxx, balrogg@xxxxxxxxx, rjones@xxxxxxxxxx, Andrew.Baumann@xxxxxxxxxxxxx, mreitz@xxxxxxxxxx, walling@xxxxxxxxxxxxx, mst@xxxxxxxxxx, mark.cave-ayland@xxxxxxxxxxxx, v.maffione@xxxxxxxxx, marex@xxxxxxx, armbru@xxxxxxxxxx, marcandre.lureau@xxxxxxxxxx, alistair@xxxxxxxxxxxxx, paul.durrant@xxxxxxxxxx, pavel.dovgaluk@xxxxxxxxx, g.lettieri@xxxxxxxxxxxx, rizzo@xxxxxxxxxxxx, david@xxxxxxxxxxxxxxxxxxxxx, akrowiak@xxxxxxxxxxxxx, berrange@xxxxxxxxxx, xiaoguangrong.eric@xxxxxxxxx, pmorel@xxxxxxxxxxxxx, wencongyang2@xxxxxxxxxx, jcd@xxxxxxxxxxxxxxx, pbonzini@xxxxxxxxxx, stefanb@xxxxxxxxxxxxx
- Delivery-date: Mon, 23 Sep 2019 17:16:22 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Don't shadow Error *err: it's a bad thing. This patch also simplifies
following Error propagation conversion.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@xxxxxxxxxxxxx>
---
net/net.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/net.c b/net/net.c
index 84aa6d8d00..5fc72511c1 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1128,10 +1128,10 @@ static int net_client_init(QemuOpts *opts, bool
is_netdev, Error **errp)
if (substrings[1]) {
/* User-specified prefix length. */
- int err;
+ int ret2;
- err = qemu_strtoul(substrings[1], NULL, 10, &prefix_len);
- if (err) {
+ ret2 = qemu_strtoul(substrings[1], NULL, 10, &prefix_len);
+ if (ret2) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
"ipv6-prefixlen", "a number");
goto out;
--
2.21.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|