From 4ae5cfe9e627429ee4d27390da9eb07a410f8831 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Fri, 13 Sep 2013 14:09:38 -0400 Subject: don't use strlen(line) when we already have that in the read variable --- kmer_total_count.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kmer_total_count.c') diff --git a/kmer_total_count.c b/kmer_total_count.c index 48e64b5..23ca512 100644 --- a/kmer_total_count.c +++ b/kmer_total_count.c @@ -41,11 +41,11 @@ int main(int argc, char **argv) { exit(EXIT_FAILURE); while ((read = getline(&line, &len, fh)) != -1) { - if(line[0] != '>') { - for(i = 0; i < strlen(line) - kmer; i++) { + if(line[0] != '>') { + for(i = 0; i < read - kmer; i++) { counts[convert_kmer_to_index(&line[i],kmer, width)]++; } - } + } } for(i = 0; i < width; i++) -- cgit v1.2.1