Skip to content

Commit 98df9e0

Browse files
committed
Use errAbort when fail
1 parent ff26706 commit 98df9e0

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

blatSrc/blat.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -696,8 +696,11 @@ void bigBlat(struct dnaSeq *untransList, int queryCount, char *queryFiles[], str
696696
frame = fwrite(buf, 1, cnt, out[0]);
697697
if (frame != cnt)
698698
{
699-
printf("Merge files failed\n");
700-
return;
699+
free(thd);
700+
free(args);
701+
free(id);
702+
free(offset);
703+
errAbort("Merge files failed\n");
701704
}
702705
}
703706
out[i] = freopen(NULL, "w+", out[i]);
@@ -946,7 +949,7 @@ int main(int argc, char *argv[])
946949
lf[i] = lineFileOpen(queryFiles[0], TRUE);
947950
}
948951

949-
952+
950953
queryCount=0;
951954
struct lineFile *tlf = lineFileOpen(queryFiles[0], TRUE);
952955
while (faMixedSpeedReadNext(tlf, NULL, NULL, NULL, &faFastBuf, &faFastBufSize))
@@ -993,8 +996,8 @@ int main(int argc, char *argv[])
993996
tmp=fwrite(buf, 1, cnt, out[0]);
994997
if (tmp!=cnt)
995998
{
996-
printf("Merge files failed\n");
997-
return 1;
999+
free(out);
1000+
errAbort("Merge files failed\n");
9981001
}
9991002
}
10001003
carefulClose(&(out[i]));

0 commit comments

Comments
 (0)