diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -2,8 +2,6 @@ #include <stdlib.h> #include <aplwc.h> -#define MEMORY (1024*1024) - int main(void) { @@ -11,19 +9,18 @@ main(void) uint8_t *data; int ret; - data = malloc(MEMORY); + data = malloc(APLWC_MIN_MEM); if(data == NULL){ fprintf(stderr, "Couldn't allocate memory\n"); return 1; } - ret = aplwc_new(&aplwc, data, MEMORY); + ret = aplwc_new(&aplwc, data, APLWC_MIN_MEM); if(ret){ fprintf(stderr, "Couldn't create new aplwc instance: %s\n", aplwc_errstr(aplwc)); return 1; } - ret = aplwc_destroy(aplwc); if(ret){ fprintf(stderr, "Couldn't destroy the aplwc instance: %s\n", aplwc_errstr(aplwc)); |