aboutsummaryrefslogtreecommitdiff
path: root/editors/awk.c
diff options
context:
space:
mode:
Diffstat (limited to 'editors/awk.c')
-rw-r--r--editors/awk.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/editors/awk.c b/editors/awk.c
index 2af39880e..7af9e1eeb 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -1473,8 +1473,10 @@ static regex_t *as_regex(node *op, regex_t *preg)
1473/* gradually increasing buffer */ 1473/* gradually increasing buffer */
1474static void qrealloc(char **b, int n, int *size) 1474static void qrealloc(char **b, int n, int *size)
1475{ 1475{
1476 if (!*b || n >= *size) 1476 if (!*b || n >= *size) {
1477 *b = xrealloc(*b, *size = n + (n>>1) + 80); 1477 *size = n + (n>>1) + 80;
1478 *b = xrealloc(*b, *size);
1479 }
1478} 1480}
1479 1481
1480/* resize field storage space */ 1482/* resize field storage space */