[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 42/411: lib: make Curl_gethostname accept a const pointer
From: |
gnunet |
Subject: |
[gnurl] 42/411: lib: make Curl_gethostname accept a const pointer |
Date: |
Wed, 13 Jan 2021 01:17:37 +0100 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit 616c30ad6768991eab4e187ad630ccbbf91ce388
Author: Emil Engler <me@emilengler.com>
AuthorDate: Wed Aug 26 21:39:21 2020 +0200
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
---
lib/curl_gethostname.c | 4 ++--
lib/curl_gethostname.h | 4 ++--
2 files changed, 4 insertions(+), 4 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
diff --git a/lib/curl_gethostname.h b/lib/curl_gethostname.h
index 8ae15e6c1..2d78bc54d 100644
--- a/lib/curl_gethostname.h
+++ b/lib/curl_gethostname.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2019, 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
@@ -26,6 +26,6 @@
#define HOSTNAME_MAX 1024
/* This returns the local machine's un-qualified hostname */
-int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen);
+int Curl_gethostname(char * const name, GETHOSTNAME_TYPE_ARG2 namelen);
#endif /* HEADER_CURL_GETHOSTNAME_H */
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnurl] 67/411: curl.1: add see also no-progress-meter on two spots, (continued)
- [gnurl] 67/411: curl.1: add see also no-progress-meter on two spots, gnunet, 2021/01/12
- [gnurl] 41/411: docs/libcurl: update "Added in" version for curl_easy_option*, gnunet, 2021/01/12
- [gnurl] 35/411: openssl: Fix wincrypt symbols conflict with BoringSSL, gnunet, 2021/01/12
- [gnurl] 18/411: configure: fix pkg-config detecting wolfssl, gnunet, 2021/01/12
- [gnurl] 32/411: schannel: fix memory leak when using get_cert_location, gnunet, 2021/01/12
- [gnurl] 10/411: CURLE_PROXY: new error code, gnunet, 2021/01/12
- [gnurl] 43/411: buildconf: invoke 'autoreconf -fi' instead, gnunet, 2021/01/12
- [gnurl] 49/411: multi: handle connection state winsock events, gnunet, 2021/01/12
- [gnurl] 57/411: ntlm: fix condition for curl_ntlm_core usage, gnunet, 2021/01/12
- [gnurl] 68/411: cmdline-opts/gen.pl: generate nicer "See Also" in curl.1, gnunet, 2021/01/12
- [gnurl] 42/411: lib: make Curl_gethostname accept a const pointer,
gnunet <=
- [gnurl] 66/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 39/411: configure: added --disable-get-easy-options, gnunet, 2021/01/12
- [gnurl] 53/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 65/411: mqtt: enable by default, gnunet, 2021/01/12
- [gnurl] 58/411: tests/getpart: use MIME::Base64 instead of home-cooked, gnunet, 2021/01/12
- [gnurl] 63/411: url: remove funny embedded comments in Curl_disonnect calls, gnunet, 2021/01/12
- [gnurl] 46/411: docs: SSLCERTS: fix English syntax, gnunet, 2021/01/12
- [gnurl] 70/411: lib/Makefile.am: bump VERSIONINFO due to new functions, gnunet, 2021/01/12
- [gnurl] 71/411: test971: show test mismatches "inline", gnunet, 2021/01/12
- [gnurl] 44/411: curl.1: fix typo invokved -> invoked, gnunet, 2021/01/12