mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
coverity/331377: os_fopen: Remove invalid iflags assert
If the O_* flags were non-zero, then ORing the flags would always be true. However, the O_* flags aren't guaranteed to be non-zero, so the assert is invalid in the first place.
This commit is contained in:
parent
d9eaca99be
commit
efed75f916
@ -471,8 +471,6 @@ FILE *os_fopen(const char *path, const char *flags)
|
|||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Per open(2) manpage.
|
|
||||||
assert((iflags|O_RDONLY) || (iflags|O_WRONLY) || (iflags|O_RDWR));
|
|
||||||
// Per fopen(3) manpage: default to 0666, it will be umask-adjusted.
|
// Per fopen(3) manpage: default to 0666, it will be umask-adjusted.
|
||||||
int fd = os_open(path, iflags, 0666);
|
int fd = os_open(path, iflags, 0666);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user