aboutsummaryrefslogtreecommitdiff
path: root/src/pool.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-04-27 04:38:04 -0400
committerB. Watson <urchlay@slackware.uk>2026-04-27 04:38:04 -0400
commit5d35bca0898f32e7a7d2c2ef8ba1c6edd3ccd583 (patch)
treef264caa5e372bf87b096b45c18e32209f1e72d12 /src/pool.c
parent0f0f5de8fa13bef97416a04753af14ad1d6c9e4b (diff)
downloadfujinet-chat-5d35bca0898f32e7a7d2c2ef8ba1c6edd3ccd583.tar.gz
Remove redundant line-clearing in steal_line().
Diffstat (limited to 'src/pool.c')
-rw-r--r--src/pool.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/pool.c b/src/pool.c
index db58d76..c385008 100644
--- a/src/pool.c
+++ b/src/pool.c
@@ -35,7 +35,7 @@ void add_to_pool(char p, u16 start, u16 end) {
l = (line_t *)start;
while(l <= (line_t *)end) {
- memclear(l, sizeof(line_t));
+ memclear(l, sizeof(line_t)); /* this is actually redundant */
l->next = pools[p].free_list;
pools[p].free_list = l;
l++;
@@ -95,9 +95,7 @@ line_t *steal_line(char s) {
/* make old_l the last line */
last_l->next = (line_t *)END_MARKER;
- /* clear out old screen data, then return the stolen line */
- memclear(l->data, LINE_LEN);
-
+ /* don't clear l->data, caller does it. */
return l;
}