From 59ad3403c29e6b2b4f7a2f3c20d1c3fd093565ec Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Fri, 15 Jul 2011 21:38:14 +0200 Subject: [PATCH] w32: Fix format string regression Commit 953ffe0f935f40c0d6061d69e76e0339393b54f8 introduced FMT_pid which is wrong for w32 and w64 getpid(): those getpid() implementations always return an int value. Signed-off-by: Stefan Weil Signed-off-by: Blue Swirl --- os-win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os-win32.c b/os-win32.c index d3cea42a50..f09f01fc49 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) {