mirror of
https://github.com/curl/curl.git
synced 2026-04-15 00:21:42 +03:00
tidy-up: move CURL_UNCONST() out from macro curl_unicodefree()
To stop applying it where not needed (most uses) and make it visible
where it's actually used (5 uses).
Follow-up to f4e23950c7 #16142
Closes #19606
This commit is contained in:
parent
b0d23b901f
commit
47b8e1dbd3
3 changed files with 6 additions and 6 deletions
|
|
@ -78,6 +78,6 @@ typedef union {
|
|||
#endif /* UNICODE && _WIN32 */
|
||||
|
||||
/* the purpose of this macro is to free() without being traced by memdebug */
|
||||
#define curlx_unicodefree(ptr) (free)(CURL_UNCONST(ptr))
|
||||
#define curlx_unicodefree(ptr) (free)(ptr)
|
||||
|
||||
#endif /* HEADER_CURL_MULTIBYTE_H */
|
||||
|
|
|
|||
|
|
@ -3050,7 +3050,7 @@ ParameterError parse_args(int argc, argv_item_t argv[])
|
|||
if(i < (argc - 1)) {
|
||||
nextarg = convert_tchar_to_UTF8(argv[i + 1]);
|
||||
if(!nextarg) {
|
||||
unicodefree(orig_opt);
|
||||
unicodefree(CURL_UNCONST(orig_opt));
|
||||
return PARAM_NO_MEM;
|
||||
}
|
||||
}
|
||||
|
|
@ -3058,7 +3058,7 @@ ParameterError parse_args(int argc, argv_item_t argv[])
|
|||
result = getparameter(orig_opt, nextarg, &passarg, config,
|
||||
CONFIG_MAX_LEVELS);
|
||||
|
||||
unicodefree(nextarg);
|
||||
unicodefree(CURL_UNCONST(nextarg));
|
||||
config = global->last;
|
||||
if(result == PARAM_NEXT_OPERATION) {
|
||||
/* Reset result as PARAM_NEXT_OPERATION is only used here and not
|
||||
|
|
@ -3096,7 +3096,7 @@ ParameterError parse_args(int argc, argv_item_t argv[])
|
|||
}
|
||||
|
||||
if(!result) {
|
||||
unicodefree(orig_opt);
|
||||
unicodefree(CURL_UNCONST(orig_opt));
|
||||
orig_opt = NULL;
|
||||
}
|
||||
}
|
||||
|
|
@ -3119,6 +3119,6 @@ ParameterError parse_args(int argc, argv_item_t argv[])
|
|||
helpf("%s", reason);
|
||||
}
|
||||
|
||||
unicodefree(orig_opt);
|
||||
unicodefree(CURL_UNCONST(orig_opt));
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2249,7 +2249,7 @@ CURLcode operate(int argc, argv_item_t argv[])
|
|||
}
|
||||
}
|
||||
|
||||
unicodefree(first_arg);
|
||||
unicodefree(CURL_UNCONST(first_arg));
|
||||
|
||||
if(!result) {
|
||||
/* Parse the command line arguments */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue