aboutsummaryrefslogtreecommitdiff
path: root/count_nucleobases.c
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2013-09-16 10:31:53 -0400
committerCalvin Morrison <mutantturkey@gmail.com>2013-09-16 10:31:53 -0400
commitad0b22e1e5124cf614c6ca44e503270d6650c45d (patch)
tree67ce44fa102e2e7379a90c239c8bd9faf1070364 /count_nucleobases.c
parent0a9476fe2aa09610a23b2a54974bbb733b478a92 (diff)
don't use strlen instead just use the read variable set by getline
Diffstat (limited to 'count_nucleobases.c')
-rwxr-xr-xcount_nucleobases.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/count_nucleobases.c b/count_nucleobases.c
index c2aafe5..3fd6aec 100755
--- a/count_nucleobases.c
+++ b/count_nucleobases.c
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
while ((read = getline(&line, &len, fh)) != -1) {
if(line[0] != '>') {
unsigned int i = 0;
- for(i = 0; i < strlen(line); i++) {
+ for(i = 0; i < read; i++) {
counts[line[i]]++;
}
}