Showing with 4 additions and 155 deletions.
  1. +0 −1 Makefile.am
  2. +0 −1 checksparse.sh
  3. +0 −15 include/uv.h
  4. +4 −2 src/unix/pipe.c
  5. +0 −34 src/uv-common.c
  6. +0 −4 test/test-list.h
  7. +0 −97 test/test-util.c
  8. +0 −1 uv.gyp
@@ -193,7 +193,6 @@ test_run_tests_SOURCES = test/blackhole-server.c \
test/test-udp-open.c \
test/test-udp-options.c \
test/test-udp-send-and-recv.c \
test/test-util.c \
test/test-walk-handles.c
test_run_tests_LDADD = libuv.la

@@ -158,7 +158,6 @@ test/test-udp-multicast-ttl.c
test/test-udp-open.c
test/test-udp-options.c
test/test-udp-send-and-recv.c
test/test-util.c
test/test-walk-handles.c
"

@@ -567,21 +567,6 @@ UV_EXTERN void uv_close(uv_handle_t* handle, uv_close_cb close_cb);
UV_EXTERN uv_buf_t uv_buf_init(char* base, unsigned int len);


/*
* Utility function. Copies up to `size` characters from `src` to `dst`
* and ensures that `dst` is properly NUL terminated unless `size` is zero.
*/
UV_EXTERN size_t uv_strlcpy(char* dst, const char* src, size_t size);

/*
* Utility function. Appends `src` to `dst` and ensures that `dst` is
* properly NUL terminated unless `size` is zero or `dst` does not
* contain a NUL byte. `size` is the total length of `dst` so at most
* `size - strlen(dst) - 1` characters will be copied from `src`.
*/
UV_EXTERN size_t uv_strlcat(char* dst, const char* src, size_t size);


#define UV_STREAM_FIELDS \
/* number of bytes queued for writing */ \
size_t write_queue_size; \
@@ -72,7 +72,8 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) {
sockfd = err;

memset(&saddr, 0, sizeof saddr);
uv_strlcpy(saddr.sun_path, pipe_fname, sizeof(saddr.sun_path));
strncpy(saddr.sun_path, pipe_fname, sizeof(saddr.sun_path) - 1);
saddr.sun_path[sizeof(saddr.sun_path) - 1] = '\0';
saddr.sun_family = AF_UNIX;

if (bind(sockfd, (struct sockaddr*)&saddr, sizeof saddr)) {
@@ -167,7 +168,8 @@ void uv_pipe_connect(uv_connect_t* req,
}

memset(&saddr, 0, sizeof saddr);
uv_strlcpy(saddr.sun_path, name, sizeof(saddr.sun_path));
strncpy(saddr.sun_path, name, sizeof(saddr.sun_path) - 1);
saddr.sun_path[sizeof(saddr.sun_path) - 1] = '\0';
saddr.sun_family = AF_UNIX;

do {
@@ -66,40 +66,6 @@ size_t uv_req_size(uv_req_type type) {

#undef XX

size_t uv_strlcpy(char* dst, const char* src, size_t size) {
size_t n;

if (size == 0)
return 0;

for (n = 0; n < (size - 1) && *src != '\0'; n++)
*dst++ = *src++;

*dst = '\0';

return n;
}


size_t uv_strlcat(char* dst, const char* src, size_t size) {
size_t n;

if (size == 0)
return 0;

for (n = 0; n < size && *dst != '\0'; n++, dst++);

if (n == size)
return n;

while (n < (size - 1) && *src != '\0')
n++, *dst++ = *src++;

*dst = '\0';

return n;
}


uv_buf_t uv_buf_init(char* base, unsigned int len) {
uv_buf_t buf;
@@ -209,8 +209,6 @@ TEST_DECLARE (thread_local_storage)
TEST_DECLARE (thread_mutex)
TEST_DECLARE (thread_rwlock)
TEST_DECLARE (thread_create)
TEST_DECLARE (strlcpy)
TEST_DECLARE (strlcat)
TEST_DECLARE (dlerror)
TEST_DECLARE (poll_duplex)
TEST_DECLARE (poll_unidirectional)
@@ -505,8 +503,6 @@ TASK_LIST_START
TEST_ENTRY (thread_mutex)
TEST_ENTRY (thread_rwlock)
TEST_ENTRY (thread_create)
TEST_ENTRY (strlcpy)
TEST_ENTRY (strlcat)
TEST_ENTRY (dlerror)
TEST_ENTRY (ip6_addr_link_local)
#if 0

This file was deleted.

1 uv.gyp
@@ -297,7 +297,6 @@
'test/runner.h',
'test/test-get-loadavg.c',
'test/task.h',
'test/test-util.c',
'test/test-active.c',
'test/test-async.c',
'test/test-async-null-cb.c',