--- a/mem2swap.c +++ b/mem2swap.c @@ -44,9 +44,9 @@ } if ((p = malloc (N * size)) == NULL) - return EXIT_SUCCESS; + return EXIT_FAILURE; - while (1) { + for (;;) { for (i = 0; i < N; i++) { p[n * N + i] = size * (n * N + i); }