Skip to content

Commit

Permalink
Merge pull request flightaware#239 from Swiftyhu/gcc-14_fix
Browse files Browse the repository at this point in the history
fix: change calloc parameter order
  • Loading branch information
mutability authored May 27, 2024
2 parents 9160dba + 84d68c6 commit eb08fd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion adaptive.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ void adaptive_init()
adaptive_burst_window_remaining = adaptive_samples_per_window;
adaptive_burst_window_counter = 0;

adaptive_range_radix = calloc(sizeof(unsigned), 65536);
adaptive_range_radix = calloc(65536, sizeof(unsigned));
adaptive_range_state = RANGE_RESCAN_UP;

// select and enforce gain limits
Expand Down
2 changes: 1 addition & 1 deletion net_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct net_service *serviceInit(const char *descr, struct net_writer *writer, he
{
struct net_service *service;

if (!(service = calloc(sizeof(*service), 1))) {
if (!(service = calloc(1, sizeof(*service)))) {
fprintf(stderr, "Out of memory allocating service %s\n", descr);
exit(1);
}
Expand Down

0 comments on commit eb08fd7

Please sign in to comment.