diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-02-08 09:33:42 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-02-10 18:38:57 +0100 |
commit | 05b100aee247bb9bec8e9a1b0166496aa4248d1c (patch) | |
tree | a0ab4d620d8102de82b08a67609394b0d2f09608 /lib/memdebug.c | |
parent | 9a36c0ae21d675587d4e2a52c50a6ce8a2150770 (diff) |
cleanup: make local functions static
urlapi: turn three local-only functions into statics
conncache: make conncache_find_first_connection static
multi: make detach_connnection static
connect: make getaddressinfo static
curl_ntlm_core: make hmac_md5 static
http2: make two functions static
http: make http_setup_conn static
connect: make tcpnodelay static
tests: make UNITTEST a thing to mark functions with, so they can be static for
normal builds and non-static for unit test builds
... and mark Curl_shuffle_addr accordingly.
url: make up_free static
setopt: make vsetopt static
curl_endian: make write32_le static
rtsp: make rtsp_connisdead static
warnless: remove unused functions
memdebug: remove one unused function, made another static
Diffstat (limited to 'lib/memdebug.c')
-rw-r--r-- | lib/memdebug.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/lib/memdebug.c b/lib/memdebug.c index 05590a8f8..08d8d4f92 100644 --- a/lib/memdebug.c +++ b/lib/memdebug.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -426,7 +426,7 @@ curl_socket_t curl_accept(curl_socket_t s, void *saddr, void *saddrlen, } /* separate function to allow libcurl to mark a "faked" close */ -void curl_mark_sclose(curl_socket_t sockfd, int line, const char *source) +static void mark_sclose(curl_socket_t sockfd, int line, const char *source) { const char *fmt = (sizeof(curl_socket_t) == sizeof(int)) ? "FD %s:%d sclose(%d)\n": @@ -442,7 +442,7 @@ void curl_mark_sclose(curl_socket_t sockfd, int line, const char *source) int curl_sclose(curl_socket_t sockfd, int line, const char *source) { int res = sclose(sockfd); - curl_mark_sclose(sockfd, line, source); + mark_sclose(sockfd, line, source); return res; } @@ -458,20 +458,6 @@ FILE *curl_fopen(const char *file, const char *mode, return res; } -#ifdef HAVE_FDOPEN -FILE *curl_fdopen(int filedes, const char *mode, - int line, const char *source) -{ - FILE *res = fdopen(filedes, mode); - - if(source) - curl_memlog("FILE %s:%d fdopen(\"%d\",\"%s\") = %p\n", - source, line, filedes, mode, (void *)res); - - return res; -} -#endif - int curl_fclose(FILE *file, int line, const char *source) { int res; |