mirror of
https://github.com/moparisthebest/curl
synced 2024-11-15 05:55:04 -05:00
compiler warning: fix
Fix compiler warning: cast increases required alignment
This commit is contained in:
parent
910d7953aa
commit
9eea43dce2
@ -4006,14 +4006,14 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
|
|||||||
cur_pos = slash_pos + 1; /* jump to the rest of the string */
|
cur_pos = slash_pos + 1; /* jump to the rest of the string */
|
||||||
if(++ftpc->dirdepth >= ftpc->diralloc) {
|
if(++ftpc->dirdepth >= ftpc->diralloc) {
|
||||||
/* enlarge array */
|
/* enlarge array */
|
||||||
char *bigger;
|
char **bigger;
|
||||||
ftpc->diralloc *= 2; /* double the size each time */
|
ftpc->diralloc *= 2; /* double the size each time */
|
||||||
bigger = realloc(ftpc->dirs, ftpc->diralloc * sizeof(ftpc->dirs[0]));
|
bigger = realloc(ftpc->dirs, ftpc->diralloc * sizeof(ftpc->dirs[0]));
|
||||||
if(!bigger) {
|
if(!bigger) {
|
||||||
freedirs(ftpc);
|
freedirs(ftpc);
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
ftpc->dirs = (char **)bigger;
|
ftpc->dirs = bigger;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user