mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 09:17:14 +00:00
jscript: Remove unnecessary call to malloc in strbuf_ensure_size.
This commit is contained in:
parent
66929987ab
commit
01deef2211
|
@ -627,10 +627,7 @@ static BOOL strbuf_ensure_size(strbuf_t *buf, unsigned len)
|
|||
new_size = buf->size ? buf->size<<1 : 16;
|
||||
if(new_size < len)
|
||||
new_size = len;
|
||||
if(buf->buf)
|
||||
new_buf = realloc(buf->buf, new_size*sizeof(WCHAR));
|
||||
else
|
||||
new_buf = malloc(new_size*sizeof(WCHAR));
|
||||
new_buf = realloc(buf->buf, new_size * sizeof(WCHAR));
|
||||
if(!new_buf)
|
||||
return FALSE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue