diff options
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/file_access.c | 4 | ||||
-rw-r--r-- | wiretap/file_wrappers.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/wiretap/file_access.c b/wiretap/file_access.c index fad807bd2f..9d59f1274c 100644 --- a/wiretap/file_access.c +++ b/wiretap/file_access.c @@ -2513,14 +2513,14 @@ wtap_dump_file_fdopen(wtap_dumper *wdh, int fd) if(wdh->compressed) { return gzwfile_fdopen(fd); } else { - return fdopen(fd, "wb"); + return ws_fdopen(fd, "wb"); } } #else static WFILE_T wtap_dump_file_fdopen(wtap_dumper *wdh _U_, int fd) { - return fdopen(fd, "wb"); + return ws_fdopen(fd, "wb"); } #endif diff --git a/wiretap/file_wrappers.c b/wiretap/file_wrappers.c index ea3ee3f0b4..5b4cbd27da 100644 --- a/wiretap/file_wrappers.c +++ b/wiretap/file_wrappers.c @@ -146,7 +146,7 @@ raw_read(FILE_T state, unsigned char *buf, unsigned int count, guint *have) *have = 0; do { - ret = read(state->fd, buf + *have, count - *have); + ret = ws_read(state->fd, buf + *have, count - *have); if (ret <= 0) break; *have += (unsigned)ret; @@ -1498,7 +1498,7 @@ gzwfile_open(const char *path) state = gzwfile_fdopen(fd); if (state == NULL) { save_errno = errno; - close(fd); + ws_close(fd); errno = save_errno; } return state; @@ -1603,7 +1603,7 @@ gz_comp(GZWFILE_T state, int flush) (flush != Z_FINISH || ret == Z_STREAM_END))) { have = strm->next_out - state->next; if (have) { - got = write(state->fd, state->next, (unsigned int)have); + got = ws_write(state->fd, state->next, (unsigned int)have); if (got < 0) { state->err = errno; return -1; @@ -1732,7 +1732,7 @@ gzwfile_close(GZWFILE_T state) g_free(state->out); g_free(state->in); state->err = Z_OK; - if (close(state->fd) == -1 && ret == 0) + if (ws_close(state->fd) == -1 && ret == 0) ret = errno; g_free(state); return ret; |