mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-11 12:09:07 +00:00
Stick to coding style: Move up braces
Signed-off-by: Sven Strickroth <email@cs-ware.de>
This commit is contained in:
parent
01e7128f39
commit
45792c923b
@ -139,13 +139,10 @@ int win32_find_msysgit_in_registry(struct win32_path *root, const HKEY hieve, co
|
|||||||
assert(root);
|
assert(root);
|
||||||
|
|
||||||
root->len = 0;
|
root->len = 0;
|
||||||
if (RegOpenKeyExW(hieve, key, 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS)
|
if (RegOpenKeyExW(hieve, key, 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS) {
|
||||||
{
|
if (RegQueryValueExW(hKey, L"InstallLocation", NULL, &dwType, (LPBYTE)&root->path, &dwSize) == ERROR_SUCCESS) {
|
||||||
if (RegQueryValueExW(hKey, L"InstallLocation", NULL, &dwType, (LPBYTE)&root->path, &dwSize) == ERROR_SUCCESS)
|
|
||||||
{
|
|
||||||
// InstallLocation points to the root of the msysgit directory
|
// InstallLocation points to the root of the msysgit directory
|
||||||
if (dwSize + 4 > MAX_PATH) // 4 = wcslen(L"etc\\")
|
if (dwSize + 4 > MAX_PATH) {// 4 = wcslen(L"etc\\")
|
||||||
{
|
|
||||||
giterr_set(GITERR_OS, "Cannot locate the system's msysgit directory - path too long");
|
giterr_set(GITERR_OS, "Cannot locate the system's msysgit directory - path too long");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user