mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-15 22:44:01 +00:00
Revert "fix unreachable code warning"
This reverts commit 202fe39d34
.
If mkostemp is a weak symbol and is null, then the code will
be reachable.
This commit is contained in:
parent
79d6710db4
commit
e530163078
1 changed files with 1 additions and 2 deletions
|
@ -63,13 +63,12 @@ int fish_mkstemp_cloexec(char *name_template) {
|
|||
if (&mkostemp != nullptr) {
|
||||
return mkostemp(name_template, O_CLOEXEC);
|
||||
}
|
||||
#else
|
||||
#endif
|
||||
int result_fd = mkstemp(name_template);
|
||||
if (result_fd != -1) {
|
||||
fcntl(result_fd, F_SETFD, FD_CLOEXEC);
|
||||
}
|
||||
return result_fd;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Fallback implementations of wcsdup and wcscasecmp. On systems where these are not needed (e.g.
|
||||
|
|
Loading…
Reference in a new issue