aboutsummaryrefslogtreecommitdiff
path: root/src/c/quikr_functions.c
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2013-10-31 12:45:07 -0400
committerCalvin Morrison <mutantturkey@gmail.com>2013-10-31 12:45:07 -0400
commit8b58ac594c394eda56fa88c9378c90441cb8c4fe (patch)
tree33241760984374aa5ab2a0d564159a7e35f51a00 /src/c/quikr_functions.c
parentd1ad194dd96b23f496844d9839cd999a505a1fb7 (diff)
return 0 instead of exit_failure in count_sequences, and remove the newline from our header
Diffstat (limited to 'src/c/quikr_functions.c')
-rw-r--r--src/c/quikr_functions.c6
1 files changed, 3 insertions, 3 deletions
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));