From 43f109302aa119d87a4bb8ab1cabb1bbabf3b74a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 30 Aug 2022 13:52:18 +0200 Subject: net: removed unused API --- src/net.c | 24 ------------------------ src/net.h | 1 - 2 files changed, 25 deletions(-) (limited to 'src') diff --git a/src/net.c b/src/net.c index 01afd8f..b52036e 100644 --- a/src/net.c +++ b/src/net.c @@ -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; -} diff --git a/src/net.h b/src/net.h index 239dc85..0cbe141 100644 --- a/src/net.h +++ b/src/net.h @@ -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 -- cgit v1.2.3