X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fvfm.c;h=08e3ca30f1f5818a88b8ea1dddadce283260abfa;hb=4aa81a07a03b3322e3bcf2ce141fe119c02f87f7;hp=b88d3eb13847f34e47d4e83e419f60f3a3f57b0d;hpb=65620ac48c2b146a580a80af120590e4e3d4a6d4;p=pspp diff --git a/src/vfm.c b/src/vfm.c index b88d3eb138..08e3ca30f1 100644 --- a/src/vfm.c +++ b/src/vfm.c @@ -227,7 +227,7 @@ open_active_file (void) lag_count = 0; lag_head = 0; - lag_queue = xmalloc (n_lag * sizeof *lag_queue); + lag_queue = xnmalloc (n_lag, sizeof *lag_queue); for (i = 0; i < n_lag; i++) case_nullify (&lag_queue[i]); } @@ -608,7 +608,7 @@ add_transformation (struct trns_header * trns) if (n_trns >= m_trns) { m_trns += 16; - t_trns = xrealloc (t_trns, sizeof *t_trns * m_trns); + t_trns = xnrealloc (t_trns, m_trns, sizeof *t_trns); } t_trns[n_trns] = trns; trns->index = n_trns++;