mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
tool_doswin: Use type SANITIZEcode in sanitize_file_name
This commit is contained in:
parent
4520534e6d
commit
9b6598ed08
@ -137,7 +137,7 @@ SANITIZEcode sanitize_file_name(char **const sanitized, const char *file_name,
|
|||||||
{
|
{
|
||||||
char *p, *target;
|
char *p, *target;
|
||||||
size_t len;
|
size_t len;
|
||||||
CURLcode res;
|
SANITIZEcode sc;
|
||||||
size_t max_sanitized_len;
|
size_t max_sanitized_len;
|
||||||
|
|
||||||
if(!sanitized)
|
if(!sanitized)
|
||||||
@ -218,10 +218,10 @@ SANITIZEcode sanitize_file_name(char **const sanitized, const char *file_name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MSDOS
|
#ifdef MSDOS
|
||||||
res = msdosify(&p, target, flags);
|
sc = msdosify(&p, target, flags);
|
||||||
free(target);
|
free(target);
|
||||||
if(res)
|
if(sc)
|
||||||
return res;
|
return sc;
|
||||||
target = p;
|
target = p;
|
||||||
len = strlen(target);
|
len = strlen(target);
|
||||||
|
|
||||||
@ -232,10 +232,10 @@ SANITIZEcode sanitize_file_name(char **const sanitized, const char *file_name,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(!(flags & SANITIZE_ALLOW_RESERVED)) {
|
if(!(flags & SANITIZE_ALLOW_RESERVED)) {
|
||||||
res = rename_if_reserved_dos_device_name(&p, target, flags);
|
sc = rename_if_reserved_dos_device_name(&p, target, flags);
|
||||||
free(target);
|
free(target);
|
||||||
if(res)
|
if(sc)
|
||||||
return res;
|
return sc;
|
||||||
target = p;
|
target = p;
|
||||||
len = strlen(target);
|
len = strlen(target);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user