aboutsummaryrefslogtreecommitdiff
path: root/qga/channel-win32.c
diff options
context:
space:
mode:
authorAlexChen <alex.chen@huawei.com>2020-10-26 17:05:38 +0800
committerMichael Roth <michael.roth@amd.com>2021-03-16 20:20:37 -0500
commit0697e9ed291c67f7f65f7006f4917cc6177ac180 (patch)
tree0b9608f3bbb667a35e041116681fbc0c3cf3f163 /qga/channel-win32.c
parent27e7de3ca740cffbdfc06e9cb138f3339d14dda7 (diff)
downloadqemu-0697e9ed291c67f7f65f7006f4917cc6177ac180.zip
qemu-0697e9ed291c67f7f65f7006f4917cc6177ac180.tar.gz
qemu-0697e9ed291c67f7f65f7006f4917cc6177ac180.tar.bz2
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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/qga/channel-win32.c b/qga/channel-win32.c
index 4f04868..779007e 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);