1
0
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:
Jay Satiro 2016-02-05 02:22:24 -05:00
parent 4520534e6d
commit 9b6598ed08

View File

@ -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);