gnunet-svn
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]