Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
45792c92
Commit
45792c92
authored
Feb 01, 2013
by
Sven Strickroth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stick to coding style: Move up braces
Signed-off-by: Sven Strickroth <email@cs-ware.de>
parent
01e7128f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
src/win32/findfile.c
+3
-6
No files found.
src/win32/findfile.c
View file @
45792c92
...
...
@@ -139,13 +139,10 @@ int win32_find_msysgit_in_registry(struct win32_path *root, const HKEY hieve, co
assert
(
root
);
root
->
len
=
0
;
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
(
RegOpenKeyExW
(
hieve
,
key
,
0
,
KEY_ALL_ACCESS
,
&
hKey
)
==
ERROR_SUCCESS
)
{
if
(
RegQueryValueExW
(
hKey
,
L"InstallLocation"
,
NULL
,
&
dwType
,
(
LPBYTE
)
&
root
->
path
,
&
dwSize
)
==
ERROR_SUCCESS
)
{
// 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"
);
return
-
1
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment