aboutsummaryrefslogtreecommitdiff
path: root/kmer_counts_per_sequence.c
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2014-03-06 17:58:19 -0500
committerCalvin Morrison <mutantturkey@gmail.com>2014-03-06 17:58:19 -0500
commitc052ff4d47ea37655670d9d0ab9754ec746c2d7c (patch)
treea95be36d703d90f23b8cb6980a98e63fae4849f8 /kmer_counts_per_sequence.c
parent2c038ba630c14c7030186c64e9eb92761ddcba74 (diff)
update readme, add a check_null_ptr function to clear up clutter
Diffstat (limited to 'kmer_counts_per_sequence.c')
-rw-r--r--kmer_counts_per_sequence.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/kmer_counts_per_sequence.c b/kmer_counts_per_sequence.c
index d5b1927..7e0e119 100644
--- a/kmer_counts_per_sequence.c
+++ b/kmer_counts_per_sequence.c
@@ -130,10 +130,7 @@ int main(int argc, char **argv) {
if(specific_mers) {
desired_indicies = malloc((width) * sizeof(size_t));
- if(desired_indicies == NULL) {
- fprintf(stderr, "%s\n", strerror(errno));
- exit(EXIT_FAILURE);
- }
+ check_null_ptr(desired_indicies, NULL);
num_desired_indicies = load_specific_mers_from_file(mer_fn, kmer, width, desired_indicies);
if(num_desired_indicies == 0) {
fprintf(stderr, "Error: no mers loaded from file\n");