Return to stringlist.c CVS log | Up to [local] / src / usr.bin / ftp |
version 1.10, 2009/05/05 19:35:30 | version 1.11, 2014/10/08 04:01:10 | ||
---|---|---|---|
|
|
||
{ | { | ||
if (sl->sl_cur == sl->sl_max - 1) { | if (sl->sl_cur == sl->sl_max - 1) { | ||
sl->sl_max += _SL_CHUNKSIZE; | sl->sl_max += _SL_CHUNKSIZE; | ||
sl->sl_str = realloc(sl->sl_str, sl->sl_max * sizeof(char *)); | sl->sl_str = reallocarray(sl->sl_str, sl->sl_max, | ||
sizeof(char *)); | |||
if (sl->sl_str == NULL) | if (sl->sl_str == NULL) | ||
err(1, "stringlist"); | err(1, "stringlist"); | ||
} | } |