Received: from eggs.gnu.org ([208.118.235.92]:60688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvVIe-0001rf-Ex for qemu-devel@nongnu.org; Wed, 16 Jan 2013 10:53:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvVIZ-00065P-QS for qemu-devel@nongnu.org; Wed, 16 Jan 2013 10:53:12 -0500 Message-ID: <50F6CCE1.4020503@redhat.com> Date: Wed, 16 Jan 2013 08:53:05 -0700 From: Eric Blake MIME-Version: 1.0 References: <1358346998-26328-1-git-send-email-armbru@redhat.com> <1358346998-26328-9-git-send-email-armbru@redhat.com> In-Reply-To: <1358346998-26328-9-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2MTSQLJLONMRHQUBBNDGL" Subject: Re: [Qemu-devel] [PATCH 08/11] qemu-log: Plug trivial memory leak in cpu_set_log_filename() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2MTSQLJLONMRHQUBBNDGL Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 01/16/2013 07:36 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > qemu-log.c | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) >=20 > diff --git a/qemu-log.c b/qemu-log.c > index 64a1b88..1eadf1b 100644 > --- a/qemu-log.c > +++ b/qemu-log.c > @@ -21,10 +21,12 @@ > #include "qemu/log.h" > =20 > #ifdef WIN32 > -static const char *logfilename =3D "qemu.log"; > +#define DEFAULT_LOGFILENAME =3D "qemu.log" Syntax error. > @@ -54,11 +56,13 @@ void qemu_log_mask(int mask, const char *fmt, ...) > /* enable or disable low levels log */ > void qemu_set_log(int log_flags, bool use_own_buffers) > { > + const char *fname =3D logfilename ?: DEFAULT_LOGFILENAME; ?: is not C99, but a GNU extension. What is our policy on using it? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2MTSQLJLONMRHQUBBNDGL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJQ9szhAAoJEKeha0olJ0NqmVEH/1ureQ7RdXpfHLiDPZxt2vWd fDZV4pFqU9zoGkrd368AtiFGwyeHbu+ffGpo5C54wMfzoolDX0SBqD/38XcfanKy 3Bqky8ypjgoyAlhcK5Bdq92Fp2hqem8XteVZ9fq+4+R+//YTUz/W9i1rpjUDhKPz VpOcyIKrRdTBLT5mT+X+Gb25CL6rvNvscXm9JmL2Rpk9Ov7jitbr1kIMSYSlBYm+ OBwW1o98UTwEVlUdvAZK8oqUqWXx/gbM6Nur/5tqdxOY7yDPDLcRUbNEbPCkTwyb 1zmN/QBGLSj4qREqW0oiBLgMp3D3ZiRRIeMi6YjlwF0ML1ywnMCNrCBilhshqQ8= =8+lg -----END PGP SIGNATURE----- ------enig2MTSQLJLONMRHQUBBNDGL--