Received: from eggs.gnu.org ([2001:4830:134:3::10]:54870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYbTL-0003Wc-2C for qemu-devel@nongnu.org; Wed, 24 Feb 2016 10:35:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYbTG-0007Tr-02 for qemu-devel@nongnu.org; Wed, 24 Feb 2016 10:35:27 -0500 Received: from mail-ob0-x242.google.com ([2607:f8b0:4003:c01::242]:36421) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYbTF-0007Tj-RV for qemu-devel@nongnu.org; Wed, 24 Feb 2016 10:35:21 -0500 Received: by mail-ob0-x242.google.com with SMTP id u2so1171067obz.3 for ; Wed, 24 Feb 2016 07:35:21 -0800 (PST) Sender: fluxion Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Roth In-Reply-To: <1455727675-20625-4-git-send-email-marcandre.lureau@redhat.com> References: <1455727675-20625-1-git-send-email-marcandre.lureau@redhat.com> <1455727675-20625-4-git-send-email-marcandre.lureau@redhat.com> Message-ID: <20160224153509.29588.89441@loki> Date: Wed, 24 Feb 2016 09:35:09 -0600 Subject: Re: [Qemu-devel] [PATCH 3/5] qga: use wide-chars constants for wchar_t comparisons List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org Cc: lersek@redhat.com Quoting marcandre.lureau@redhat.com (2016-02-17 10:47:53) > From: Marc-Andr=C3=A9 Lureau > = > Reported-by: Laszlo Ersek > Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Michael Roth > --- > qga/commands-win32.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > = > diff --git a/qga/commands-win32.c b/qga/commands-win32.c > index e5afc5d..b20f107 100644 > --- a/qga/commands-win32.c > +++ b/qga/commands-win32.c > @@ -1266,8 +1266,10 @@ get_net_error_message(gint error) > if (msg !=3D NULL) { > nchars =3D wcslen(msg); > = > - if (nchars > 2 && msg[nchars-1] =3D=3D '\n' && msg[nchars-2] =3D= =3D '\r') { > - msg[nchars-2] =3D '\0'; > + if (nchars > 2 && > + msg[nchars - 1] =3D=3D L'\n' && > + msg[nchars - 2] =3D=3D L'\r') { > + msg[nchars - 2] =3D L'\0'; > } > = > retval =3D g_utf16_to_utf8(msg, -1, NULL, NULL, NULL); > -- = > 2.5.0 >=20