提交 59ad3403 编写于 作者: S Stefan Weil 提交者: Blue Swirl

w32: Fix format string regression

Commit 953ffe0f
introduced FMT_pid which is wrong for w32 and w64 getpid():
those getpid() implementations always return an int value.
Signed-off-by: NStefan Weil <weil@mail.berlios.de>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 0e0167ba
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册