Add some notes to cat.c

master
Mid Favila 10 months ago
parent 0ecd45a51d
commit 613b12f0de

@ -86,6 +86,7 @@ int main(int argc, char **argv)
if(!upresence and (2 * (strlen(buf) + strlen(newbuf)) >= buflen))
{
/* Rewrite this bit to use realloc and/or memcpy? */
tmpbuf = malloc(2 * (strlen(buf) + strlen(newbuf)));
strcpy(tmpbuf, buf);
free(buf);

Loading…
Cancel
Save