Skip to content

Commit

Permalink
Use errAbort when fail
Browse files Browse the repository at this point in the history
  • Loading branch information
icebert committed Jun 14, 2020
1 parent ff26706 commit 98df9e0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions blatSrc/blat.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,11 @@ void bigBlat(struct dnaSeq *untransList, int queryCount, char *queryFiles[], str
frame = fwrite(buf, 1, cnt, out[0]);
if (frame != cnt)
{
printf("Merge files failed\n");
return;
free(thd);
free(args);
free(id);
free(offset);
errAbort("Merge files failed\n");
}
}
out[i] = freopen(NULL, "w+", out[i]);
Expand Down Expand Up @@ -946,7 +949,7 @@ int main(int argc, char *argv[])
lf[i] = lineFileOpen(queryFiles[0], TRUE);
}


queryCount=0;
struct lineFile *tlf = lineFileOpen(queryFiles[0], TRUE);
while (faMixedSpeedReadNext(tlf, NULL, NULL, NULL, &faFastBuf, &faFastBufSize))
Expand Down Expand Up @@ -993,8 +996,8 @@ int main(int argc, char *argv[])
tmp=fwrite(buf, 1, cnt, out[0]);
if (tmp!=cnt)
{
printf("Merge files failed\n");
return 1;
free(out);
errAbort("Merge files failed\n");
}
}
carefulClose(&(out[i]));
Expand Down

0 comments on commit 98df9e0

Please sign in to comment.