diff options
author | Markus Armbruster <armbru@redhat.com> | 2013-01-11 11:24:58 +0100 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2013-01-14 12:07:37 -0600 |
commit | 5d27f9ce3de424207883d84352d76150e9707394 (patch) | |
tree | a9fe2e137142f4c021b74740cbe9dcd984402936 /qga | |
parent | f5b795787864ddde1104a4f7c061dcb0e58e45c0 (diff) | |
download | hqemu-5d27f9ce3de424207883d84352d76150e9707394.zip hqemu-5d27f9ce3de424207883d84352d76150e9707394.tar.gz |
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 <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qga')
-rw-r--r-- | qga/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |