From 8b58ac594c394eda56fa88c9378c90441cb8c4fe Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Thu, 31 Oct 2013 12:45:07 -0400 Subject: return 0 instead of exit_failure in count_sequences, and remove the newline from our header --- src/c/quikr_functions.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/c') diff --git a/src/c/quikr_functions.c b/src/c/quikr_functions.c index c99660b..fab05ab 100644 --- a/src/c/quikr_functions.c +++ b/src/c/quikr_functions.c @@ -10,7 +10,6 @@ #include "quikr.h" unsigned long long count_sequences(const char *filename) { - char *line = NULL; size_t len = 0; ssize_t read; @@ -19,8 +18,8 @@ unsigned long long count_sequences(const char *filename) { FILE *fh = fopen(filename, "r"); if(fh == NULL) { - fprintf(stderr, "could not open\"%s\"", filename ); - exit(EXIT_FAILURE); + fprintf(stderr, "could not open \"%s\"\n", filename ); + return 0; } while ((read = getline(&line, &len, fh)) != -1) { @@ -180,6 +179,7 @@ struct matrix *load_sensing_matrix(const char *filename) { exit(EXIT_FAILURE); } + header[strlen(header) - 1] = '\0'; headers[i] = header+1; row = memset(row, 0, (width + 1) * sizeof(unsigned long long)); -- cgit v1.2.3