aboutsummaryrefslogtreecommitdiff
path: root/qga/commands-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/commands-win32.c
parent27e7de3ca740cffbdfc06e9cb138f3339d14dda7 (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/commands-win32.c')
-rw-r--r--qga/commands-win32.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index a00e6cb165..4f4c579a3b 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -110,15 +110,15 @@ static OpenFlags guest_file_open_modes[] = {
{"w", GENERIC_WRITE, CREATE_ALWAYS},
{"wb", GENERIC_WRITE, CREATE_ALWAYS},
{"a", FILE_GENERIC_APPEND, OPEN_ALWAYS },
- {"r+", GENERIC_WRITE|GENERIC_READ, OPEN_EXISTING},
- {"rb+", GENERIC_WRITE|GENERIC_READ, OPEN_EXISTING},
- {"r+b", GENERIC_WRITE|GENERIC_READ, OPEN_EXISTING},
- {"w+", GENERIC_WRITE|GENERIC_READ, CREATE_ALWAYS},
- {"wb+", GENERIC_WRITE|GENERIC_READ, CREATE_ALWAYS},
- {"w+b", GENERIC_WRITE|GENERIC_READ, CREATE_ALWAYS},
- {"a+", FILE_GENERIC_APPEND|GENERIC_READ, OPEN_ALWAYS },
- {"ab+", FILE_GENERIC_APPEND|GENERIC_READ, OPEN_ALWAYS },
- {"a+b", FILE_GENERIC_APPEND|GENERIC_READ, OPEN_ALWAYS }
+ {"r+", GENERIC_WRITE | GENERIC_READ, OPEN_EXISTING},
+ {"rb+", GENERIC_WRITE | GENERIC_READ, OPEN_EXISTING},
+ {"r+b", GENERIC_WRITE | GENERIC_READ, OPEN_EXISTING},
+ {"w+", GENERIC_WRITE | GENERIC_READ, CREATE_ALWAYS},
+ {"wb+", GENERIC_WRITE | GENERIC_READ, CREATE_ALWAYS},
+ {"w+b", GENERIC_WRITE | GENERIC_READ, CREATE_ALWAYS},
+ {"a+", FILE_GENERIC_APPEND | GENERIC_READ, OPEN_ALWAYS },
+ {"ab+", FILE_GENERIC_APPEND | GENERIC_READ, OPEN_ALWAYS },
+ {"a+b", FILE_GENERIC_APPEND | GENERIC_READ, OPEN_ALWAYS }
};
#define debug_error(msg) do { \
@@ -280,7 +280,7 @@ static void acquire_privilege(const char *name, Error **errp)
Error *local_err = NULL;
if (OpenProcessToken(GetCurrentProcess(),
- TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY, &token))
+ TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &token))
{
if (!LookupPrivilegeValue(NULL, name, &priv.Privileges[0].Luid)) {
error_setg(&local_err, QERR_QGA_COMMAND_FAILED,
@@ -1116,7 +1116,7 @@ static GuestFilesystemInfo *build_guest_fsinfo(char *guid, Error **errp)
len = strlen(mnt_point);
mnt_point[len] = '\\';
- mnt_point[len+1] = 0;
+ mnt_point[len + 1] = 0;
if (!GetVolumeInformationByHandleW(hLocalDiskHandle, vol_info,
sizeof(vol_info), NULL, NULL, NULL,