diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-08-30 13:52:18 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-08-30 13:52:18 +0200 |
commit | 43f109302aa119d87a4bb8ab1cabb1bbabf3b74a (patch) | |
tree | 41d62ee91d35a1e6ee9af1d47066a0bfa5e4b4a7 | |
parent | net: error out unless net_recv_all receives all bytes (diff) | |
download | cimple-43f109302aa119d87a4bb8ab1cabb1bbabf3b74a.tar.gz cimple-43f109302aa119d87a4bb8ab1cabb1bbabf3b74a.zip |
net: removed unused API
-rw-r--r-- | src/net.c | 24 | ||||
-rw-r--r-- | src/net.h | 1 |
2 files changed, 0 insertions, 25 deletions
@@ -240,27 +240,3 @@ free_buf: fail: return -1; } - -int net_recv_static(int fd, void *buf, size_t len) -{ - void *actual_buf; - uint32_t actual_len; - int ret = 0; - - ret = net_recv_buf(fd, &actual_buf, &actual_len); - if (ret < 0) - return ret; - - if (actual_len != len) { - print_error("Expected message length: %lu, actual: %u\n", len, actual_len); - ret = -1; - goto free_buf; - } - - memcpy(buf, actual_buf, len); - -free_buf: - free(actual_buf); - - return ret; -} @@ -14,6 +14,5 @@ int net_send_buf(int fd, const void *, uint32_t); int net_recv_all(int fd, void *, size_t); int net_recv_buf(int fd, void **, uint32_t *); -int net_recv_static(int fd, void *, size_t); #endif |