aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/c/kmer_utils.c1
-rw-r--r--src/c/quikr_functions.c5
2 files changed, 3 insertions, 3 deletions
diff --git a/src/c/kmer_utils.c b/src/c/kmer_utils.c
index 20a79f4..b85dbda 100644
--- a/src/c/kmer_utils.c
+++ b/src/c/kmer_utils.c
@@ -156,6 +156,7 @@ unsigned long long * get_kmer_counts_from_file(const char *fn, const unsigned in
free(line);
free(str);
+ fclose(fh);
return counts;
}
diff --git a/src/c/quikr_functions.c b/src/c/quikr_functions.c
index 82af029..5715024 100644
--- a/src/c/quikr_functions.c
+++ b/src/c/quikr_functions.c
@@ -34,7 +34,6 @@
ssize_t getseq(char **lineptr, size_t *n, FILE *fp) {
int result = 0;
ssize_t cur_len = 0;
- ssize_t len;
if (lineptr == NULL || n == NULL || fp == NULL)
{
@@ -57,7 +56,6 @@ ssize_t getseq(char **lineptr, size_t *n, FILE *fp) {
int newline = 0;
for (;;) {
- char *t;
int i;
i = getc (fp);
@@ -353,7 +351,7 @@ struct matrix *load_sensing_matrix(const char *filename, unsigned int target_kme
check_malloc(header, NULL);
header = strncpy(header, buf, read - 1);
if(header[0] != '>') {
- fprintf(stderr, "Error parsing sensing matrix, could not read header\n");
+ fprintf(stderr, "Error parsing sensing matrix, could not read header in line %llu\n", lineno);
exit(EXIT_FAILURE);
}
lineno++;
@@ -365,6 +363,7 @@ struct matrix *load_sensing_matrix(const char *filename, unsigned int target_kme
for(j = 0; j < width; j++) {
line = gzgets(fh, line, 32);
+ lineno++;
if(line == NULL || line[0] == '>') {
fprintf(stderr, "Error parsing sensing matrix, line %zu does not look like a value\n", lineno);
exit(EXIT_FAILURE);