Skip to content

Commit

Permalink
Fix argument order to calloc
Browse files Browse the repository at this point in the history
  • Loading branch information
johanhedin committed Jul 16, 2024
1 parent c7ed1c5 commit 4932d87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sdrx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ static void alsa_worker(struct OutputState &ctx) {
std::cout << "Number of ALSA descriptors to poll: " << num_poll_descs << std::endl;

// Allocate space and get the descriptors
poll_descs = (struct pollfd*)calloc(sizeof(struct pollfd), num_poll_descs);
poll_descs = (struct pollfd*)calloc(num_poll_descs, sizeof(struct pollfd));
ret = snd_pcm_poll_descriptors(pcm_handle, poll_descs, num_poll_descs);
if (ret < 0) {
std::cerr << "Error. Unable to get ALSA poll descriptors: " << snd_strerror(ret) << std::endl;
Expand Down

0 comments on commit 4932d87

Please sign in to comment.