aboutsummaryrefslogtreecommitdiff
path: root/src/win/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/win/util.c')
-rw-r--r--src/win/util.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/win/util.c b/src/win/util.c
index da1238d3..8c2681fe 100644
--- a/src/win/util.c
+++ b/src/win/util.c
@@ -378,10 +378,15 @@ done:
static int uv__get_process_title(void) {
WCHAR title_w[MAX_TITLE_LENGTH];
DWORD wlen;
+ DWORD err;
+ SetLastError(ERROR_SUCCESS);
wlen = GetConsoleTitleW(title_w, sizeof(title_w) / sizeof(WCHAR));
- if (wlen == 0)
- return uv_translate_sys_error(GetLastError());
+ if (wlen == 0) {
+ err = GetLastError();
+ if (err != 0)
+ return uv_translate_sys_error(err);
+ }
return uv__convert_utf16_to_utf8(title_w, wlen, &process_title);
}
@@ -867,12 +872,6 @@ int uv_interface_addresses(uv_interface_address_t** addresses_ptr,
}
-void uv_free_interface_addresses(uv_interface_address_t* addresses,
- int count) {
- uv__free(addresses);
-}
-
-
int uv_getrusage(uv_rusage_t *uv_rusage) {
FILETIME create_time, exit_time, kernel_time, user_time;
SYSTEMTIME kernel_system_time, user_system_time;