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
a49e5bed
Commit
a49e5bed
authored
Feb 08, 2013
by
Patrick Pokatilo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace call to strnlen with call to strlen
parent
f88885e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
src/win32/posix_w32.c
+5
-6
No files found.
src/win32/posix_w32.c
View file @
a49e5bed
...
...
@@ -12,7 +12,6 @@
#include <io.h>
#include <fcntl.h>
#include <ws2tcpip.h>
#include <string.h>
int
p_unlink
(
const
char
*
path
)
{
...
...
@@ -100,7 +99,7 @@ static int do_lstat(
buf
->
st_atime
=
filetime_to_time_t
(
&
(
fdata
.
ftLastAccessTime
));
buf
->
st_mtime
=
filetime_to_time_t
(
&
(
fdata
.
ftLastWriteTime
));
buf
->
st_ctime
=
filetime_to_time_t
(
&
(
fdata
.
ftCreationTime
));
/* Windows symlinks have zero file size, call readlink to determine
* the length of the path pointed to, which we expect everywhere else
*/
...
...
@@ -108,13 +107,13 @@ static int do_lstat(
{
char
target
[
GIT_WIN_PATH
];
int
readlink_result
;
readlink_result
=
p_readlink
(
file_name
,
target
,
GIT_WIN_PATH
);
if
(
readlink_result
==
-
1
)
return
-
1
;
buf
->
st_size
=
str
nlen
(
target
,
GIT_WIN_PATH
);
buf
->
st_size
=
str
len
(
target
);
}
return
0
;
...
...
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