mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 02:59:01 +08:00
Fix posix_open()
This commit is contained in:
parent
5bf5516b29
commit
acf58972f7
@ -679,10 +679,10 @@ static void posix_list(const char *dir, void (*fn)(const char *, void *),
|
||||
}
|
||||
|
||||
static struct mg_fd *posix_open(const char *path, int flags) {
|
||||
const char *mode =
|
||||
flags & (MG_FS_READ | MG_FS_WRITE)
|
||||
? "r+b"
|
||||
: flags & MG_FS_READ ? "rb" : flags & MG_FS_WRITE ? "wb" : "";
|
||||
const char *mode = flags == (MG_FS_READ | MG_FS_WRITE) ? "r+b"
|
||||
: flags & MG_FS_READ ? "rb"
|
||||
: flags & MG_FS_WRITE ? "wb"
|
||||
: "";
|
||||
void *fp = NULL;
|
||||
struct mg_fd *fd = NULL;
|
||||
#ifdef _WIN32
|
||||
|
@ -155,10 +155,10 @@ static void posix_list(const char *dir, void (*fn)(const char *, void *),
|
||||
}
|
||||
|
||||
static struct mg_fd *posix_open(const char *path, int flags) {
|
||||
const char *mode =
|
||||
flags & (MG_FS_READ | MG_FS_WRITE)
|
||||
? "r+b"
|
||||
: flags & MG_FS_READ ? "rb" : flags & MG_FS_WRITE ? "wb" : "";
|
||||
const char *mode = flags == (MG_FS_READ | MG_FS_WRITE) ? "r+b"
|
||||
: flags & MG_FS_READ ? "rb"
|
||||
: flags & MG_FS_WRITE ? "wb"
|
||||
: "";
|
||||
void *fp = NULL;
|
||||
struct mg_fd *fd = NULL;
|
||||
#ifdef _WIN32
|
||||
|
Loading…
Reference in New Issue
Block a user