From 5d27f9ce3de424207883d84352d76150e9707394 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 11 Jan 2013 11:24:58 +0100 Subject: qemu-ga: Drop pointless lseek() from ga_open_pidfile() After open(), the file offset is already zero, and neither lockf() nor ftruncate() change it. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Michael Roth Reviewed-by: Luiz Capitulino Signed-off-by: Michael Roth --- qga/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qga/main.c') diff --git a/qga/main.c b/qga/main.c index e8a9a9ee7e..96d3cfa381 100644 --- a/qga/main.c +++ b/qga/main.c @@ -289,7 +289,7 @@ static bool ga_open_pidfile(const char *pidfile) return false; } - if (ftruncate(pidfd, 0) || lseek(pidfd, 0, SEEK_SET)) { + if (ftruncate(pidfd, 0)) { g_critical("Failed to truncate pid file"); goto fail; } -- cgit v1.2.1