From 756b48d7d9c38305faa46a12101f1afa659e8d01 Mon Sep 17 00:00:00 2001 From: "rconty@il4p.fr" Date: Sun, 25 Sep 2011 17:07:59 +0000 Subject: [PATCH] Use fclose at right time, count the loaded fingerpriting files (Fixes Issue 5) --- src/mfcuk_finger.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mfcuk_finger.c b/src/mfcuk_finger.c index 7017914..52788db 100644 --- a/src/mfcuk_finger.c +++ b/src/mfcuk_finger.c @@ -145,7 +145,8 @@ int mfcuk_finger_load() FILE *fp = NULL; size_t result = 0; mfcuk_finger_template *tmpl_new = NULL; - + + int template_loaded_count = 0; for (i = 0; ivalues), &(values), sizeof(values)); mfcuk_finger_db[i].tmpl_data = tmpl_new; + template_loaded_count++; } } - fclose(fp); - return 1; + return template_loaded_count; } int mfcuk_finger_unload()