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
02285482
Commit
02285482
authored
Jun 17, 2011
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fileops: Cast the GetProcAddress value
parent
9c11bd0a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/fileops.c
+4
-3
No files found.
src/fileops.c
View file @
02285482
...
...
@@ -689,7 +689,8 @@ int gitfo_lstat__w32(const char *file_name, struct stat *buf)
int
gitfo_readlink__w32
(
const
char
*
link
,
char
*
target
,
size_t
target_len
)
{
static
DWORD
(
*
pGetFinalPath
)(
HANDLE
,
LPTSTR
,
DWORD
,
DWORD
)
=
NULL
;
typedef
DWORD
(
WINAPI
*
fpath_func
)(
HANDLE
,
LPTSTR
,
DWORD
,
DWORD
);
static
fpath_func
pGetFinalPath
=
NULL
;
HANDLE
hFile
;
DWORD
dwRet
;
...
...
@@ -698,10 +699,10 @@ int gitfo_readlink__w32(const char *link, char *target, size_t target_len)
* it is not available in platforms older than Vista
*/
if
(
pGetFinalPath
==
NULL
)
{
H
ANDL
E
library
=
LoadLibrary
(
"kernel32"
);
H
INSTANC
E
library
=
LoadLibrary
(
"kernel32"
);
if
(
library
!=
NULL
)
pGetFinalPath
=
GetProcAddress
(
library
,
"GetFinalPathNameByHandleA"
);
pGetFinalPath
=
(
fpath_func
)
GetProcAddress
(
library
,
"GetFinalPathNameByHandleA"
);
if
(
pGetFinalPath
==
NULL
)
return
git__throw
(
GIT_EOSERR
,
...
...
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