diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-12-09 15:20:48 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-12-09 15:20:48 +0100 |
commit | 3d1bb6a8ddc5074059b37f0954faca7f9f42fda2 (patch) | |
tree | ac59606e48ac2181694029cf73a39976d7a1e03c /test | |
parent | 3831db7044118ee948d7203421628628c2c7dc76 (diff) | |
parent | abe088c58aeb876d1471fa99e0fc5c1d85cb1403 (diff) | |
download | ufodecode-3d1bb6a8ddc5074059b37f0954faca7f9f42fda2.tar.gz ufodecode-3d1bb6a8ddc5074059b37f0954faca7f9f42fda2.tar.bz2 ufodecode-3d1bb6a8ddc5074059b37f0954faca7f9f42fda2.tar.xz ufodecode-3d1bb6a8ddc5074059b37f0954faca7f9f42fda2.zip |
Merge from Matthias
Diffstat (limited to 'test')
-rw-r--r-- | test/ipedec.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/ipedec.c b/test/ipedec.c index 22d71bc..c6bf4ee 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]); |