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
f621f087
Commit
f621f087
authored
Jun 15, 2015
by
Edward Thomson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3220 from libgit2/cmn/readdir
path: remove unnecessary readdir_r usage
parents
2665fefa
25bd0aaf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
src/path.c
+3
-4
src/path.h
+1
-1
No files found.
src/path.c
View file @
f621f087
...
@@ -889,7 +889,7 @@ void git_path_iconv_clear(git_path_iconv_t *ic)
...
@@ -889,7 +889,7 @@ void git_path_iconv_clear(git_path_iconv_t *ic)
}
}
}
}
int
git_path_iconv
(
git_path_iconv_t
*
ic
,
char
**
in
,
size_t
*
inlen
)
int
git_path_iconv
(
git_path_iconv_t
*
ic
,
c
onst
c
har
**
in
,
size_t
*
inlen
)
{
{
char
*
nfd
=
*
in
,
*
nfc
;
char
*
nfd
=
*
in
,
*
nfc
;
size_t
nfdlen
=
*
inlen
,
nfclen
,
wantlen
=
nfdlen
,
alloclen
,
rv
;
size_t
nfdlen
=
*
inlen
,
nfclen
,
wantlen
=
nfdlen
,
alloclen
,
rv
;
...
@@ -1018,8 +1018,7 @@ int git_path_direach(
...
@@ -1018,8 +1018,7 @@ int git_path_direach(
int
error
=
0
;
int
error
=
0
;
ssize_t
wd_len
;
ssize_t
wd_len
;
DIR
*
dir
;
DIR
*
dir
;
path_dirent_data
de_data
;
struct
dirent
*
de
;
struct
dirent
*
de
,
*
de_buf
=
(
struct
dirent
*
)
&
de_data
;
#ifdef GIT_USE_ICONV
#ifdef GIT_USE_ICONV
git_path_iconv_t
ic
=
GIT_PATH_ICONV_INIT
;
git_path_iconv_t
ic
=
GIT_PATH_ICONV_INIT
;
...
@@ -1045,7 +1044,7 @@ int git_path_direach(
...
@@ -1045,7 +1044,7 @@ int git_path_direach(
(
void
)
git_path_iconv_init_precompose
(
&
ic
);
(
void
)
git_path_iconv_init_precompose
(
&
ic
);
#endif
#endif
while
(
p_readdir_r
(
dir
,
de_buf
,
&
de
)
==
0
&&
de
!=
NULL
)
{
while
(
(
de
=
readdir
(
dir
))
!=
NULL
)
{
char
*
de_path
=
de
->
d_name
;
char
*
de_path
=
de
->
d_name
;
size_t
de_len
=
strlen
(
de_path
);
size_t
de_len
=
strlen
(
de_path
);
...
...
src/path.h
View file @
f621f087
...
@@ -407,7 +407,7 @@ extern void git_path_iconv_clear(git_path_iconv_t *ic);
...
@@ -407,7 +407,7 @@ extern void git_path_iconv_clear(git_path_iconv_t *ic);
* pointer internal iconv buffer if rewrite happened. The `in` pointer
* pointer internal iconv buffer if rewrite happened. The `in` pointer
* will be left unchanged if no rewrite was needed.
* will be left unchanged if no rewrite was needed.
*/
*/
extern
int
git_path_iconv
(
git_path_iconv_t
*
ic
,
char
**
in
,
size_t
*
inlen
);
extern
int
git_path_iconv
(
git_path_iconv_t
*
ic
,
c
onst
c
har
**
in
,
size_t
*
inlen
);
#endif
/* GIT_USE_ICONV */
#endif
/* GIT_USE_ICONV */
...
...
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