Skip to content

Commit

Permalink
Merge pull request #3 from smcameron/master
Browse files Browse the repository at this point in the history
Fix a couple bad mallocs.
  • Loading branch information
dcf21 authored Dec 14, 2021
2 parents 4ea8cc1 + 6f89330 commit 83fcc6d
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 83fcc6d

Please sign in to comment.