From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:41086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwGPj-00052u-Bv for qemu-devel@nongnu.org; Tue, 19 Feb 2019 20:11:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwGP5-0004T4-7Y for qemu-devel@nongnu.org; Tue, 19 Feb 2019 20:10:33 -0500 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 20 Feb 2019 02:02:26 +0100 Message-Id: <20190220010232.18731-20-philmd@redhat.com> In-Reply-To: <20190220010232.18731-1-philmd@redhat.com> References: <20190220010232.18731-1-philmd@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v3 19/25] s390/ebcdic: Use size_t to iterate over arrays List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Prasad J Pandit , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini Cc: Jason Wang , Anthony Perard , qemu-ppc@nongnu.org, Stefan Berger , David Gibson , Gerd Hoffmann , Zhang Chen , xen-devel@lists.xenproject.org, Cornelia Huck , Samuel Thibault , Christian Borntraeger , Amit Shah , Li Zhijian , Corey Minyard , "Michael S. Tsirkin" , Paul Durrant , Halil Pasic , Stefano Stabellini , qemu-s390x@nongnu.org, Pavel Dovgalyuk , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/s390x/ebcdic.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/hw/s390x/ebcdic.h b/include/hw/s390x/ebcdic.h index 69a04cab62..d89174e113 100644 --- a/include/hw/s390x/ebcdic.h +++ b/include/hw/s390x/ebcdic.h @@ -83,18 +83,18 @@ static const uint8_t ascii2ebcdic[] =3D { 0x90, 0x3F, 0x3F, 0x3F, 0x3F, 0xEA, 0x3F, 0xFF }; =20 -static inline void ebcdic_put(uint8_t *p, const char *ascii, int len) +static inline void ebcdic_put(uint8_t *p, const char *ascii, size_t len) { - int i; + size_t i; =20 for (i =3D 0; i < len; i++) { p[i] =3D ascii2ebcdic[(uint8_t)ascii[i]]; } } =20 -static inline void ascii_put(uint8_t *p, const char *ebcdic, int len) +static inline void ascii_put(uint8_t *p, const char *ebcdic, size_t len) { - int i; + size_t i; =20 for (i =3D 0; i < len; i++) { p[i] =3D ebcdic2ascii[(uint8_t)ebcdic[i]]; --=20 2.20.1