--- a/mem2swap.c +++ b/mem2swap.c @@ -51,9 +51,8 @@ return EXIT_FAILURE; for (;;) { - for (i = 0; i < N; i++) { + for (i = 0; i < N; i++) p[n * N + i] = size * (n * N + i); - } if ((p_new = realloc (p, (++n + 1) * N * size))) p = p_new; else