mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 09:58:54 +08:00
Revert "fix unreachable code warning"
This reverts commit 202fe39d3428ccb98c453ed026e7f7d0bd1967fa. If mkostemp is a weak symbol and is null, then the code will be reachable.
This commit is contained in:
parent
79d6710db4
commit
e530163078
@ -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…
x
Reference in New Issue
Block a user