[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 11/29: tool: make a few char pointers point to const char instea
From: |
gnunet |
Subject: |
[gnurl] 11/29: tool: make a few char pointers point to const char instead |
Date: |
Fri, 10 Jan 2020 23:05:49 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit a8d13336b5dc369a8f517ba55b5c38c9a23d06b2
Author: Marcel Raad <address@hidden>
AuthorDate: Sat Apr 13 23:00:45 2019 +0200
tool: make a few char pointers point to const char instead
These are read-only.
Closes https://github.com/curl/curl/pull/4771
---
src/tool_getparam.c | 3 +--
src/tool_paramhlp.c | 2 +-
src/tool_paramhlp.h | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index a7bcdafac..ced453192 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -1985,8 +1985,7 @@ ParameterError getparameter(const char *flag, /* f or
-long-flag */
}
{
/* byte range requested */
- char *tmp_range;
- tmp_range = nextarg;
+ const char *tmp_range = nextarg;
while(*tmp_range != '\0') {
if(!ISDIGIT(*tmp_range) && *tmp_range != '-' && *tmp_range != ',') {
warnf(global, "Invalid character is found in given range. "
diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c
index b7a8efbd2..de1b26d70 100644
--- a/src/tool_paramhlp.c
+++ b/src/tool_paramhlp.c
@@ -560,7 +560,7 @@ int ftpcccmethod(struct OperationConfig *config, const char
*str)
return CURLFTPSSL_CCC_PASSIVE;
}
-long delegation(struct OperationConfig *config, char *str)
+long delegation(struct OperationConfig *config, const char *str)
{
if(curl_strequal("none", str))
return CURLGSSAPI_DELEGATION_NONE;
diff --git a/src/tool_paramhlp.h b/src/tool_paramhlp.h
index f13a114fd..d925b8476 100644
--- a/src/tool_paramhlp.h
+++ b/src/tool_paramhlp.h
@@ -50,7 +50,7 @@ int ftpfilemethod(struct OperationConfig *config, const char
*str);
int ftpcccmethod(struct OperationConfig *config, const char *str);
-long delegation(struct OperationConfig *config, char *str);
+long delegation(struct OperationConfig *config, const char *str);
ParameterError str2tls_max(long *val, const char *str);
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 01/29: url2file.c: fix copyright year, (continued)
- [gnurl] 01/29: url2file.c: fix copyright year, gnunet, 2020/01/10
- [gnurl] 04/29: os400: Add missing CURLE error constants, gnunet, 2020/01/10
- [gnurl] 03/29: CURLOPT_HEADERFUNCTION.3: Document that size is always 1, gnunet, 2020/01/10
- [gnurl] 02/29: examples/postinmemory.c: Call curl_global_cleanup always, gnunet, 2020/01/10
- [gnurl] 07/29: tool_operate: fix mem leak when failed config parse, gnunet, 2020/01/10
- [gnurl] 05/29: lib: fix warnings found when porting to NuttX, gnunet, 2020/01/10
- [gnurl] 06/29: lib: remove erroneous +x file permission on some c files, gnunet, 2020/01/10
- [gnurl] 09/29: bearssl: Improve I/O handling, gnunet, 2020/01/10
- [gnurl] 10/29: tests: Change NTLM tests to require SSL, gnunet, 2020/01/10
- [gnurl] 08/29: travis: Fix error detection, gnunet, 2020/01/10
- [gnurl] 11/29: tool: make a few char pointers point to const char instead,
gnunet <=
- [gnurl] 23/29: file: fix copyright year range, gnunet, 2020/01/10
- [gnurl] 12/29: tests: Fix bounce requests with truncated writes, gnunet, 2020/01/10
- [gnurl] 21/29: file: on Windows, refuse paths that start with \\, gnunet, 2020/01/10
- [gnurl] 20/29: CURLOPT_READFUNCTION.3: fix fopen params in example, gnunet, 2020/01/10
- [gnurl] 19/29: CURLOPT_READFUNCTION.3: fix variable name in example, gnunet, 2020/01/10
- [gnurl] 13/29: COPYING: it's 2020!, gnunet, 2020/01/10
- [gnurl] 24/29: multi.h: move INITIAL_MAX_CONCURRENT_STREAMS from public header, gnunet, 2020/01/10
- [gnurl] 17/29: docs: mention CURL_MAX_INPUT_LENGTH restrictions, gnunet, 2020/01/10
- [gnurl] 26/29: RELEASE-PROCEDURE: add four future release dates, gnunet, 2020/01/10
- [gnurl] 14/29: lib: fix compiler warnings with `CURL_DISABLE_VERBOSE_STRINGS`, gnunet, 2020/01/10