bladeRF/gcc14-fix-calloc-arg-order.patch

27 lines
846 B
Diff
Raw Permalink Normal View History

Source: https://github.com/Nuand/bladeRF/commit/b55af91f6b0ccb9afd09dcd3a42b9110c7e5be6f
--- bladeRF-2023.02-origin/host/utilities/bladeRF-fsk/c/src/fir_filter.c
+++ bladeRF-2023.02/host/utilities/bladeRF-fsk/c/src/fir_filter.c
@@ -213,18 +213,18 @@
return EXIT_FAILURE;
}
- inbuf = calloc(2*sizeof(int16_t), chunk_size);
+ inbuf = calloc(chunk_size, 2*sizeof(int16_t));
if (!inbuf) {
perror("calloc");
goto out;
}
- tempbuf = calloc(2*sizeof(int16_t), chunk_size);
+ tempbuf = calloc(chunk_size, 2*sizeof(int16_t));
if (!tempbuf) {
perror("calloc");
goto out;
}
- outbuf = calloc(sizeof(struct complex_sample), chunk_size);
+ outbuf = calloc(chunk_size, sizeof(struct complex_sample));
if (!outbuf) {
perror("calloc");
goto out;