From 924219b1abf542eabc6740570436640382c82a39 Mon Sep 17 00:00:00 2001 From: Simon Levermann Date: Wed, 7 Aug 2013 13:23:12 +0200 Subject: Actually use write_result --- testing/Messenger_test.c | 1 + 1 file changed, 1 insertion(+) (limited to 'testing') diff --git a/testing/Messenger_test.c b/testing/Messenger_test.c index ad86184d..24a78abb 100644 --- a/testing/Messenger_test.c +++ b/testing/Messenger_test.c @@ -139,6 +139,7 @@ int main(int argc, char *argv[]) uint8_t * buffer = malloc(Messenger_size()); Messenger_save(buffer); size_t write_result = fwrite(buffer, 1, Messenger_size(), file); + if (write_result < Messenger_size()) {return 1;} free(buffer); fclose(file); } -- cgit v1.2.3