We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a801aed commit 786d70fCopy full SHA for 786d70f
src/fsk_get_test_bits.c
@@ -29,7 +29,6 @@
29
30
#include <stdio.h>
31
#include <stdlib.h>
32
-#include <alloca.h>
33
#include <string.h>
34
#include "fsk.h"
35
@@ -70,11 +69,11 @@ int main(int argc,char *argv[]){
70
69
71
if(fout==NULL){
72
fprintf(stderr,"Couldn't open output file: %s\n", argv[1]);
73
- goto cleanup;
+ exit(1);
74
}
75
76
/* allocate buffers for processing */
77
- bitbuf = (uint8_t*)alloca(sizeof(uint8_t)*framesize);
+ bitbuf = (uint8_t*)malloc(sizeof(uint8_t)*framesize);
78
79
/* Generate buffer of test frame bits from known seed */
80
srand(158324);
@@ -91,7 +90,7 @@ int main(int argc,char *argv[]){
91
90
92
93
94
- cleanup:
+ free(bitbuf);
95
fclose(fout);
96
97
return 0;
0 commit comments