equal
deleted
inserted
replaced
49 |
49 |
50 if ((p = malloc (N * size)) == NULL) |
50 if ((p = malloc (N * size)) == NULL) |
51 return EXIT_FAILURE; |
51 return EXIT_FAILURE; |
52 |
52 |
53 for (;;) { |
53 for (;;) { |
54 for (i = 0; i < N; i++) { |
54 for (i = 0; i < N; i++) |
55 p[n * N + i] = size * (n * N + i); |
55 p[n * N + i] = size * (n * N + i); |
56 } |
|
57 if ((p_new = realloc (p, (++n + 1) * N * size))) |
56 if ((p_new = realloc (p, (++n + 1) * N * size))) |
58 p = p_new; |
57 p = p_new; |
59 else |
58 else |
60 break; |
59 break; |
61 } |
60 } |