fix unreachable code warning

Found with clang's -Wunreachable-code

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-04-04 19:00:16 -07:00
committed by ridiculousfish
parent d278ff4e45
commit 202fe39d34

View File

@@ -63,12 +63,13 @@ int fish_mkstemp_cloexec(char *name_template) {
if (&mkostemp != nullptr) {
return mkostemp(name_template, O_CLOEXEC);
}
#endif
#else
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.