diff options
author | Julian T <julian@jtle.dk> | 2020-03-23 16:14:53 +0100 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2020-03-23 16:14:53 +0100 |
commit | 8fc5b36510c5964873d88069b61b558bc3ef23f6 (patch) | |
tree | 849aa4694da76ca000d27137ad35746b3976d81d /main.c | |
parent | 6ae610fd7f28ba5ba7a8e0233cd6fb0ac5df4a8b (diff) |
Removed dynamic allocation of color in main.c
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -93,12 +93,10 @@ int main() for (int x = TESTW; x; x--) { // Random seed seed = x * y; - color_t *c = ray_trace(&cont->space, x, y, 2, &seed); + color_t c; + ray_trace(&cont->space, x, y, 2, &c, &seed); - if (c) { - pgm_write_pixel(stdout, c); - } - free(c); + pgm_write_pixel(stdout, &c); } |