From 613b12f0dedacb08d8057bed36e916650aae7d9b Mon Sep 17 00:00:00 2001 From: Mid Favila Date: Sat, 13 Aug 2022 20:16:54 -0400 Subject: [PATCH] Add some notes to cat.c --- src/cat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cat.c b/src/cat.c index a1292f8..b2ac6e7 100644 --- a/src/cat.c +++ b/src/cat.c @@ -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);