From f682537abf93fcbc1d91320ba256bd8389f5d84d Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Wed, 11 Sep 2013 09:45:13 -0400 Subject: use right types --- kmer_frequency_per_sequence.c | 2 +- kmer_total_count.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kmer_frequency_per_sequence.c b/kmer_frequency_per_sequence.c index 7171193..5fff8ba 100644 --- a/kmer_frequency_per_sequence.c +++ b/kmer_frequency_per_sequence.c @@ -32,11 +32,11 @@ int main(int argc, char **argv) { while ((read = getline(&line, &len, fh)) != -1) { if(line[0] != '>') { + unsigned int i = 0; unsigned long long *counts = malloc((width+ 1) * sizeof(unsigned long long)); if(counts == NULL) exit(EXIT_FAILURE); - unsigned int i = 0; for(i = 0; i < strlen(line) - kmer; i++) { counts[convert_kmer_to_index(&line[i], kmer, width)]++; } diff --git a/kmer_total_count.c b/kmer_total_count.c index 3679025..48e64b5 100644 --- a/kmer_total_count.c +++ b/kmer_total_count.c @@ -13,9 +13,9 @@ int main(int argc, char **argv) { char *line = NULL; size_t len = 0; ssize_t read; - unsigned int i = 0; unsigned int kmer = 0; - unsigned int width = 0; + unsigned long i = 0; + unsigned long width = 0; unsigned long long *counts; if(argc != 3) { -- cgit v1.2.3