From: "Laurent Desnogues" <laurent.desnogues@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Fix crash at startup
Date: Mon, 19 Jan 2009 08:16:12 +0100 [thread overview]
Message-ID: <761ea48b0901182316q107d3a7p522a35a8425792b5@mail.gmail.com> (raw)
In-Reply-To: <1232348333.23907.5.camel@cocoduo.atr>
[-- Attachment #1: Type: text/plain, Size: 671 bytes --]
On Mon, Jan 19, 2009 at 7:58 AM, Lionel Landwerlin
<lionel.landwerlin@openwide.fr> wrote:
> Fix crash at startup
>
> Signed-off-by: Lionel Landwerlin <lionel.landwerlin@openwide.fr>
> ---
> exec.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/exec.c b/exec.c
> index faa6333..7c9d7dc 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -2066,2 +2066,2 @@ void page_dump(FILE *f)
> int i, j, prot, prot1;
> PageDesc *p;
>
> + if (!f)
> + return;
> +
I would prefer a slightly different approach like the attached patch,
but that's just personal taste :-)
Laurent
Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: log.patch --]
[-- Type: text/x-patch; name=log.patch, Size: 478 bytes --]
Index: qemu-log.h
===================================================================
--- qemu-log.h (revision 6367)
+++ qemu-log.h (working copy)
@@ -63,10 +63,12 @@
disas(logfile, (start), (len))
/* page_dump() output to the log file: */
-#define log_page_dump() page_dump(logfile)
+#define log_page_dump() do { \
+ if (logfile) \
+ page_dump(logfile); \
+ } while (0)
-
/* Maintenance: */
/* fflush() the log file */
prev parent reply other threads:[~2009-01-19 7:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-19 6:58 [Qemu-devel] [PATCH] Fix crash at startup Lionel Landwerlin
2009-01-19 7:16 ` Laurent Desnogues [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=761ea48b0901182316q107d3a7p522a35a8425792b5@mail.gmail.com \
--to=laurent.desnogues@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).