diff options
author | Emil Engler <me@emilengler.com> | 2020-08-26 21:39:21 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-08-27 22:52:22 +0200 |
commit | 616c30ad6768991eab4e187ad630ccbbf91ce388 (patch) | |
tree | 64444b35bdd03b307857cadddfc6f2dca4ac140a /lib/curl_gethostname.c | |
parent | 0da301a082ada33215f41ba54735e310e05a9075 (diff) | |
download | curl-616c30ad6768991eab4e187ad630ccbbf91ce388.tar.gz |
lib: make Curl_gethostname accept a const pointer
The address of that variable never gets changed, only the data in it so
why not make it a "char * const"?
Closes #5866
Diffstat (limited to 'lib/curl_gethostname.c')
-rw-r--r-- | lib/curl_gethostname.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/curl_gethostname.c b/lib/curl_gethostname.c index 8337c72e8..5f1c9998f 100644 --- a/lib/curl_gethostname.c +++ b/lib/curl_gethostname.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2020, 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 @@ -48,7 +48,7 @@ * For libcurl static library release builds no overriding takes place. */ -int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) +int Curl_gethostname(char * const name, GETHOSTNAME_TYPE_ARG2 namelen) { #ifndef HAVE_GETHOSTNAME |