qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/3] w32: Fix format string regression


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 3/3] w32: Fix format string regression
Date: Fri, 15 Jul 2011 22:42:05 +0200

Am 15.07.2011 um 21:38 schrieb Stefan Weil:

Commit 953ffe0f935f40c0d6061d69e76e0339393b54f8
introduced FMT_pid which is wrong for w32 and w64 getpid():
those getpid() implementations always return an int value.

Where is __int64 FMT_pid used then if not for the returned pid?

Andreas


Signed-off-by: Stefan Weil <address@hidden>
---
os-win32.c |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/os-win32.c b/os-win32.c
index b6652af..e153058 100644
--- a/os-win32.c
+++ b/os-win32.c
@@ -258,7 +258,7 @@ int qemu_create_pidfile(const char *filename)
    if (file == INVALID_HANDLE_VALUE) {
        return -1;
    }
-    len = snprintf(buffer, sizeof(buffer), FMT_pid "\n", getpid());
+    len = snprintf(buffer, sizeof(buffer), "%d\n", getpid());
    ret = WriteFileEx(file, (LPCVOID)buffer, (DWORD)len,
                      &overlap, NULL);
    if (ret == 0) {
--
1.7.2.5






reply via email to

[Prev in Thread] Current Thread [Next in Thread]