diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-05-28 22:52:00 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-05-28 22:52:00 +0000 |
commit | 0dc3cb15e337f063a64bcdf69f5105c3dd16be30 (patch) | |
tree | 682af21a7f49e5c82f6881e967548e1ca6b18ade /win32 | |
parent | 691ada381696e62b1686b80bebcb5fce92133097 (diff) |
Squelch yet another warning.
Use the ws_ "routines" (really #defines) for consistency.
svn path=/trunk/; revision=37449
Diffstat (limited to 'win32')
-rw-r--r-- | win32/file_dlg_win32.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/win32/file_dlg_win32.c b/win32/file_dlg_win32.c index 92eeafea36..0e191b992f 100644 --- a/win32/file_dlg_win32.c +++ b/win32/file_dlg_win32.c @@ -804,13 +804,17 @@ win32_export_sslkeys_file(HWND h_wnd) { g_free(keylist); return; } - if (write(fd, keylist->data, strlen(keylist->data)) < 0) { + /* + * Thanks, Microsoft, for not using size_t for the third argument to + * _write(). Presumably this string will be <= 4GiB long.... + */ + if (ws_write(fd, keylist->data, (unsigned int)strlen(keylist->data)) < 0) { write_failure_alert_box(file_name8, errno); - close(fd); + ws_close(fd); g_free(keylist); return; } - if (close(fd) < 0) { + if (ws_close(fd) < 0) { write_failure_alert_box(file_name8, errno); g_free(keylist); return; |