From 33682940183b8cf00a314b3c565d47b14469c273 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Sun, 9 Nov 2014 19:31:21 +0100 Subject: [PATCH] Don't terminate the application on error. Terminating the application on error, by calling exit, is not appropriate in a library. An error code should be returned instead. --- src/suunto_eonsteel_parser.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/suunto_eonsteel_parser.c b/src/suunto_eonsteel_parser.c index b15b6ea..3d2ffae 100644 --- a/src/suunto_eonsteel_parser.c +++ b/src/suunto_eonsteel_parser.c @@ -186,9 +186,8 @@ static int traverse_entry(suunto_eonsteel_parser_t *eon, const unsigned char *p, name += 2; if (*name != '<') { - fflush(NULL); debug("bad", p, 16); - exit(1); + return -1; } record_type(eon, type, name, textlen-3);