Skip to content

Commit

Permalink
Fix a couple bad mallocs.
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
  • Loading branch information
smcameron committed Oct 1, 2020
1 parent d2b064a commit 6f89330
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/astroGraphics/ephemeris.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ void ephemerides_fetch(chart_config *s) {
// Track the sky coverage of the ephemerides in RA and Dec
int ra_bins = s->ra_line_count * 2;
int dec_bins = s->dec_line_count * 2;
int *ra_usage = (int *) malloc(ra_bins * sizeof(ra_usage));
int *dec_usage = (int *) malloc(dec_bins * sizeof(dec_usage));
int *ra_usage = (int *) malloc(ra_bins * sizeof(*ra_usage));
int *dec_usage = (int *) malloc(dec_bins * sizeof(*dec_usage));

// Zero map of sky coverage
for (i = 0; i < ra_bins; i++) ra_usage[i] = 0;
Expand Down

0 comments on commit 6f89330

Please sign in to comment.