aboutsummaryrefslogtreecommitdiff
path: root/qemu-timer.c
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2012-05-08 19:14:43 +0200
committerStefan Weil <sw@weilnetz.de>2012-05-14 07:27:24 +0200
commit52ef651f56c0526e98c2db865e793d7a5ec66477 (patch)
tree31fed569f60c90d86cb93a0846ab8c6465e18137 /qemu-timer.c
parent94d1991445fa3582c042ee4e5b72606e2fc39cc2 (diff)
downloadqemu-52ef651f56c0526e98c2db865e793d7a5ec66477.zip
qemu-52ef651f56c0526e98c2db865e793d7a5ec66477.tar.gz
qemu-52ef651f56c0526e98c2db865e793d7a5ec66477.tar.bz2
qemu-timer: Fix wrong error message
Function timeSetEvent returns 0 when it fails, but it does not set an error code which can be retrieved by GetLastError. Therefore calling GetLastError is useless. Signed-off-by: Stefan Weil <sw@weilnetz.de>
Diffstat (limited to 'qemu-timer.c')
-rw-r--r--qemu-timer.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/qemu-timer.c b/qemu-timer.c
index 4a6fc98..de98977 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -635,8 +635,7 @@ static int mm_start_timer(struct qemu_alarm_timer *t)
TIME_ONESHOT | TIME_CALLBACK_FUNCTION);
if (!mm_timer) {
- fprintf(stderr, "Failed to initialize win32 alarm timer: %ld\n",
- GetLastError());
+ fprintf(stderr, "Failed to initialize win32 alarm timer\n");
timeEndPeriod(mm_tc.wPeriodMin);
return -1;
}
@@ -667,9 +666,7 @@ static void mm_rearm_timer(struct qemu_alarm_timer *t, int64_t delta)
TIME_ONESHOT | TIME_CALLBACK_FUNCTION);
if (!mm_timer) {
- fprintf(stderr, "Failed to re-arm win32 alarm timer %ld\n",
- GetLastError());
-
+ fprintf(stderr, "Failed to re-arm win32 alarm timer\n");
timeEndPeriod(mm_tc.wPeriodMin);
exit(1);
}