diff --git a/lib/nghttp2_helper.c b/lib/nghttp2_helper.c index 3b841cc3..dcc70bd0 100644 --- a/lib/nghttp2_helper.c +++ b/lib/nghttp2_helper.c @@ -51,21 +51,6 @@ uint32_t nghttp2_get_uint32(const uint8_t *data) { return ntohl(n); } -void *nghttp2_memdup(const void *src, size_t n, nghttp2_mem *mem) { - void *dest; - - if (n == 0) { - return NULL; - } - - dest = nghttp2_mem_malloc(mem, n); - if (dest == NULL) { - return NULL; - } - memcpy(dest, src, n); - return dest; -} - /* Generated by gendowncasetbl.py */ static const uint8_t DOWNCASE_TBL[] = { 0 /* NUL */, 1 /* SOH */, 2 /* STX */, 3 /* ETX */, diff --git a/lib/nghttp2_helper.h b/lib/nghttp2_helper.h index 89631823..9e2a71d3 100644 --- a/lib/nghttp2_helper.h +++ b/lib/nghttp2_helper.h @@ -67,18 +67,6 @@ uint16_t nghttp2_get_uint16(const uint8_t *data); */ uint32_t nghttp2_get_uint32(const uint8_t *data); -/* - * Allocates |n| bytes of memory and copy the memory region pointed by - * |src| with the length |n| bytes into it. Returns the allocated memory. - * - * This function returns pointer to allocated memory, or one of the - * following negative error codes: - * - * NGHTTP2_ERR_NOMEM - * Out of memory. - */ -void *nghttp2_memdup(const void *src, size_t n, nghttp2_mem *mem); - void nghttp2_downcase(uint8_t *s, size_t len); /*