Skip to content

Commit

Permalink
Exit code 0 should only be for success
Browse files Browse the repository at this point in the history
  • Loading branch information
muffato committed Aug 19, 2014
1 parent 3c1381e commit 55b043e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions best.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 99,7 @@ Tree *best_core(BestConfig *bo)

if (!bo->ma->is_nucl) {
fprintf(stderr, "<best_core> input is not a nucleotide alignment.\n");
return 0;
exit(1);
}

/* initilization */
Expand All @@ -124,7 124,7 @@ Tree *best_core(BestConfig *bo)

if (!bo->ma->len) {
fprintf(stderr, "The filtered alignment has 0 columns. Cannot build a tree\n");
return 0;
exit(1);
}

FILE* f_filtalign = fopen("filtalign.fa", "w");
Expand All @@ -135,7 135,7 @@ Tree *best_core(BestConfig *bo)
if (tma == 0) {
fprintf(stderr, "<best_core> fail to translate the alignment. Is it a valid coding alignment?\n");
ma_free_nucl_data();
return 0;
exit(1);
}

n_spec = tr_is_has_spec(bo->ma, bo->stree);
Expand Down

0 comments on commit 55b043e

Please sign in to comment.