From 0697e9ed291c67f7f65f7006f4917cc6177ac180 Mon Sep 17 00:00:00 2001 From: AlexChen Date: Mon, 26 Oct 2020 17:05:38 +0800 Subject: qga: Add spaces around operator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-by: Euler Robot Signed-off-by: AlexChen Reviewed-by: Marc-André Lureau *fix 80+ char violation while we're here *fix w32 build breakage from changing INVALID_SET_FILE_POINTER definition from a cast to a subtraction Signed-off-by: Michael Roth --- qga/channel-win32.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'qga/channel-win32.c') diff --git a/qga/channel-win32.c b/qga/channel-win32.c index 4f04868a76..779007e39b 100644 --- a/qga/channel-win32.c +++ b/qga/channel-win32.c @@ -292,9 +292,9 @@ static gboolean ga_channel_open(GAChannel *c, GAChannelMethod method, return false; } - if (method == GA_CHANNEL_ISA_SERIAL){ + if (method == GA_CHANNEL_ISA_SERIAL) { snprintf(newpath, sizeof(newpath), "\\\\.\\%s", path); - }else { + } else { g_strlcpy(newpath, path, sizeof(newpath)); } @@ -307,7 +307,8 @@ static gboolean ga_channel_open(GAChannel *c, GAChannelMethod method, return false; } - if (method == GA_CHANNEL_ISA_SERIAL && !SetCommTimeouts(c->handle,&comTimeOut)) { + if (method == GA_CHANNEL_ISA_SERIAL + && !SetCommTimeouts(c->handle, &comTimeOut)) { g_autofree gchar *emsg = g_win32_error_message(GetLastError()); g_critical("error setting timeout for com port: %s", emsg); CloseHandle(c->handle); -- cgit v1.2.3