aboutsummaryrefslogtreecommitdiff
path: root/kmer_total_count.c
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2013-09-13 14:09:38 -0400
committerCalvin Morrison <mutantturkey@gmail.com>2013-09-13 14:09:38 -0400
commit4ae5cfe9e627429ee4d27390da9eb07a410f8831 (patch)
treedf3820e629b8f05aa34e81d669bd94dbd7f9b404 /kmer_total_count.c
parentdc659709ec94c9d414df8b04f62322f74e1e4a0d (diff)
don't use strlen(line) when we already have that in the read variable
Diffstat (limited to 'kmer_total_count.c')
-rw-r--r--kmer_total_count.c6
1 files changed, 3 insertions, 3 deletions
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++)