diff options
| author | Barton E. Schaefer <schaefer@zsh.org> | 2015-08-10 12:55:56 -0700 |
|---|---|---|
| committer | Barton E. Schaefer <schaefer@zsh.org> | 2015-08-10 12:55:56 -0700 |
| commit | 45424e735d3c5aac5cf1171acb3a7c8047255ca0 (patch) | |
| tree | 397c5c20eb25f8e8f3b480240379733dabd16322 /Src/text.c | |
| parent | 36079: do not allow update_job() and its helpers to run the signal queue whil... (diff) | |
| download | zsh-45424e735d3c5aac5cf1171acb3a7c8047255ca0.tar zsh-45424e735d3c5aac5cf1171acb3a7c8047255ca0.tar.gz zsh-45424e735d3c5aac5cf1171acb3a7c8047255ca0.tar.bz2 zsh-45424e735d3c5aac5cf1171acb3a7c8047255ca0.tar.lz zsh-45424e735d3c5aac5cf1171acb3a7c8047255ca0.tar.xz zsh-45424e735d3c5aac5cf1171acb3a7c8047255ca0.tar.zst zsh-45424e735d3c5aac5cf1171acb3a7c8047255ca0.zip | |
36084: use zrealloc() consistently
Diffstat (limited to 'Src/text.c')
| -rw-r--r-- | Src/text.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/text.c b/Src/text.c index cf73004d5..3978a26a9 100644 --- a/Src/text.c +++ b/Src/text.c @@ -77,7 +77,7 @@ taddpending(char *str1, char *str2) */ if (tpending) { int oldlen = strlen(tpending); - tpending = realloc(tpending, len + oldlen); + tpending = zrealloc(tpending, len + oldlen); sprintf(tpending + oldlen, "%s%s", str1, str2); } else { tpending = (char *)zalloc(len); @@ -110,7 +110,7 @@ taddchr(int c) tptr--; return; } - tbuf = realloc(tbuf, tsiz *= 2); + tbuf = zrealloc(tbuf, tsiz *= 2); tlim = tbuf + tsiz; tptr = tbuf + tsiz / 2; } @@ -130,7 +130,7 @@ taddstr(char *s) if (!tbuf) return; - tbuf = realloc(tbuf, tsiz *= 2); + tbuf = zrealloc(tbuf, tsiz *= 2); tlim = tbuf + tsiz; tptr = tbuf + x; } |
