From c052ff4d47ea37655670d9d0ab9754ec746c2d7c Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Thu, 6 Mar 2014 17:58:19 -0500 Subject: update readme, add a check_null_ptr function to clear up clutter --- kmer_counts_per_sequence.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'kmer_counts_per_sequence.c') 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"); -- cgit v1.2.3