From ad0b22e1e5124cf614c6ca44e503270d6650c45d Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Mon, 16 Sep 2013 10:31:53 -0400 Subject: don't use strlen instead just use the read variable set by getline --- count_nucleobases.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'count_nucleobases.c') 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]]++; } } -- cgit v1.2.3