diff options
author | Calvin Morrison <mutantturkey@gmail.com> | 2013-09-11 09:45:13 -0400 |
---|---|---|
committer | Calvin Morrison <mutantturkey@gmail.com> | 2013-09-11 09:45:13 -0400 |
commit | f682537abf93fcbc1d91320ba256bd8389f5d84d (patch) | |
tree | 0fedd26b76c68afbd91163d0e574bf1529ae60e5 | |
parent | 12fd24e056d18e9f7ee8e1e47a42e47c843c98ff (diff) |
use right types
-rw-r--r-- | kmer_frequency_per_sequence.c | 2 | ||||
-rw-r--r-- | 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) { |