Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
rockchip_bionic
Commits
1ba0e274
Commit
1ba0e274
authored
8 years ago
by
Elliott Hughes
Committed by
Gerrit Code Review
8 years ago
Browse files
Options
Download
Plain Diff
Merge "Add missing O_CLOEXEC and TEMP_FAILURE_RETRY to localtime.c."
parents
0bee605a
4edd651e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
libc/tzcode/localtime.c
libc/tzcode/localtime.c
+2
-2
No files found.
libc/tzcode/localtime.c
View file @
1ba0e274
...
...
@@ -426,7 +426,7 @@ tzloadbody(char const *name, struct state *sp, bool doextend,
return
errno
;
#if defined(__BIONIC__)
nread
=
read
(
fid
,
up
->
buf
,
entry_length
);
nread
=
TEMP_FAILURE_RETRY
(
read
(
fid
,
up
->
buf
,
entry_length
)
)
;
#else
nread
=
read
(
fid
,
up
->
buf
,
sizeof
up
->
buf
);
#endif
...
...
@@ -2361,7 +2361,7 @@ static int __bionic_open_tzdata_path(const char* path_prefix_variable, const cha
return
-
1
;
}
snprintf
(
path
,
path_length
,
"%s/%s"
,
path_prefix
,
path_suffix
);
int
fd
=
TEMP_FAILURE_RETRY
(
open
(
path
,
O
PEN_MODE
));
int
fd
=
TEMP_FAILURE_RETRY
(
open
(
path
,
O
_RDONLY
|
O_CLOEXEC
));
if
(
fd
==
-
1
)
{
free
(
path
);
return
-
2
;
// Distinguish failure to find any data from failure to find a specific id.
...
...
This diff is collapsed.
Click to expand it.
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