summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-09-18 09:58:14 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-09-18 09:58:14 +0200
commit49942414246ad4438112352d545488f9005c6b9b (patch)
tree5a6d25a5ac14291d7a12fec7d86e2c30ae635e08
parentf9671c1ee14a5bcad05d48b7aa7f943ad15cb125 (diff)
downloadcurl-bagder/help-strdup-param.tar.gz
fixup remove 'const' from tool_help() and avoid a typecastbagder/help-strdup-param
-rw-r--r--src/tool_help.c4
-rw-r--r--src/tool_help.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tool_help.c b/src/tool_help.c
index aeb40b098..a67e4bc85 100644
--- a/src/tool_help.c
+++ b/src/tool_help.c
@@ -899,7 +899,7 @@ static void get_categories(void)
}
-void tool_help(const char *category)
+void tool_help(char *category)
{
puts("Usage: curl [options...] <url>");
/* If no category was provided */
@@ -923,7 +923,7 @@ void tool_help(const char *category)
puts("Invalid category provided, here is a list of all categories:\n");
get_categories();
}
- free((char *)category);
+ free(category);
}
static int
diff --git a/src/tool_help.h b/src/tool_help.h
index 536ac10f8..1da23cc54 100644
--- a/src/tool_help.h
+++ b/src/tool_help.h
@@ -23,7 +23,7 @@
***************************************************************************/
#include "tool_setup.h"
-void tool_help(const char *category);
+void tool_help(char *category);
void tool_list_engines(void);
void tool_version_info(void);