summaryrefslogtreecommitdiffstats
path: root/test/ipedec.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-09 15:20:48 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-09 15:20:48 +0100
commit3d1bb6a8ddc5074059b37f0954faca7f9f42fda2 (patch)
treeac59606e48ac2181694029cf73a39976d7a1e03c /test/ipedec.c
parent3831db7044118ee948d7203421628628c2c7dc76 (diff)
parentabe088c58aeb876d1471fa99e0fc5c1d85cb1403 (diff)
downloadlibufodecode-3d1bb6a8ddc5074059b37f0954faca7f9f42fda2.tar.gz
libufodecode-3d1bb6a8ddc5074059b37f0954faca7f9f42fda2.tar.bz2
libufodecode-3d1bb6a8ddc5074059b37f0954faca7f9f42fda2.tar.xz
libufodecode-3d1bb6a8ddc5074059b37f0954faca7f9f42fda2.zip
Merge from Matthias
Diffstat (limited to 'test/ipedec.c')
-rw-r--r--test/ipedec.c6
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]);