diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/ipedec.c | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/test/ipedec.c b/test/ipedec.c index 94c8d59..f14498d 100644 --- a/test/ipedec.c +++ b/test/ipedec.c @@ -1,6 +1,7 @@  #include <stdio.h>  #include <stdlib.h>  #include <stdint.h> +#include <string.h>  #include <unistd.h>  #include <sys/time.h>  #include <errno.h> @@ -42,8 +43,11 @@ int main(int argc, char const* argv[])      char *buffer = NULL;      size_t num_bytes = 0; -    if (read_raw_file(argv[1], &buffer, &num_bytes)) +    int error = read_raw_file(argv[1], &buffer, &num_bytes); +    if (error) { +        printf("file reading error: %s\n", strerror(error));          return EXIT_FAILURE; +    }      const int rows = atoi(argv[2]); @@ -55,6 +59,7 @@ int main(int argc, char const* argv[])      struct timeval start, end;      long seconds = 0L, useconds = 0L; +      FILE *fp = fopen("test.raw", "wb");      while (!err) { | 
