2 ms·
Sure but he does it the first time
by soheil 6y ago
Sure but he does it the first time
- amelius 6y agoI think the multiplication should be here: buffer = realloc(buffer, bufsize * sizeof(char)); This makes the code symmetric wrt. the malloc() call. And better allows the code to be rewritten when moving to e.g. a wide-character type.