diff options
author | AlexChen <alex.chen@huawei.com> | 2020-10-26 17:05:38 +0800 |
---|---|---|
committer | Michael Roth <michael.roth@amd.com> | 2021-03-16 20:20:37 -0500 |
commit | 0697e9ed291c67f7f65f7006f4917cc6177ac180 (patch) | |
tree | 0b9608f3bbb667a35e041116681fbc0c3cf3f163 /qga/channel-win32.c | |
parent | 27e7de3ca740cffbdfc06e9cb138f3339d14dda7 (diff) |
qga: Add spaces around operator
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: AlexChen <alex.chen@huawei.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
*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 <michael.roth@amd.com>
Diffstat (limited to 'qga/channel-win32.c')
-rw-r--r-- | qga/channel-win32.c | 7 |
1 files changed, 4 insertions, 3 deletions
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); |