mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(store_char): Use x2nrealloc rather than xrealloc.
This commit is contained in:
1 parent
bf4248b344
commit
dfed7d19ac
1 file changed
+1
-2
@@ -2013,8 +2013,7 @@ store_char (int c)
|
||||
if (buff_current >= buff_allocated)
|
||||
{
|
||||
/* May be too generous. */
|
||||
buff_allocated = 2 * buff_allocated;
|
||||
buff = xrealloc (buff, buff_allocated * sizeof (char));
|
||||
buff = x2nrealloc (buff, &buff_allocated, sizeof *buff);
|
||||
}
|
||||
buff[buff_current++] = (char) c;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user