From 1987728fa84f0869ab82d32e374d4be97889207c Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 13 Jun 2011 23:18:15 +0200 Subject: [PATCH] uv_ip4_addr() should take a const char*, not a mutable char*. --- uv-unix.c | 2 +- uv-win.c | 2 +- uv.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/uv-unix.c b/uv-unix.c index b0e85d95..4163683c 100644 --- a/uv-unix.c +++ b/uv-unix.c @@ -122,7 +122,7 @@ static uv_err_t uv_err_new(uv_handle_t* handle, int sys_error) { } -struct sockaddr_in uv_ip4_addr(char* ip, int port) { +struct sockaddr_in uv_ip4_addr(const char* ip, int port) { struct sockaddr_in addr; addr.sin_family = AF_INET; diff --git a/uv-win.c b/uv-win.c index 6a42b4d4..e9e1bbb6 100644 --- a/uv-win.c +++ b/uv-win.c @@ -705,7 +705,7 @@ int uv_close(uv_handle_t* handle, uv_close_cb close_cb) { } -struct sockaddr_in uv_ip4_addr(char* ip, int port) { +struct sockaddr_in uv_ip4_addr(const char* ip, int port) { struct sockaddr_in addr; addr.sin_family = AF_INET; diff --git a/uv.h b/uv.h index 491e4676..2806cc29 100644 --- a/uv.h +++ b/uv.h @@ -367,7 +367,7 @@ int64_t uv_now(); /* Utility */ -struct sockaddr_in uv_ip4_addr(char* ip, int port); +struct sockaddr_in uv_ip4_addr(const char* ip, int port); /* Gets the executable path */ int uv_get_exepath(char* buffer, size_t* size);