diff options
-rwxr-xr-x | count_nucleobases.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/count_nucleobases.c b/count_nucleobases.c index fbf4ce2..1b432da 100755 --- a/count_nucleobases.c +++ b/count_nucleobases.c @@ -6,7 +6,7 @@ #include <stdbool.h> int main() { - ssize_t len = 0; + size_t len = 0; unsigned long long counts[256] = {0}; @@ -32,8 +32,15 @@ int main() { } } } - } else { fprintf(stderr, "this does not look like a fasta file\n"); } - } else { fprintf(stderr, "could not read file\n"); } + } + else { + fprintf(stderr, "this does not look like a fasta file\n"); + exit(EXIT_FAILURE); + } + } else { + fprintf(stderr, "could not read file\n"); + exit(EXIT_FAILURE); + } printf("A:%llu\nC:%llu\nG:%llu\nT:%llu\n", counts['a'] + counts['A'], |