lh3 / seqtk

Toolkit for processing sequences in FASTA/Q formats
MIT License
1.39k stars 306 forks source link

Only test for successful buffer allocation if a buffer needs to be allocated #30

Closed bwlang closed 10 years ago

bwlang commented 10 years ago

re: #29

No buffer is allocated when using fractions of original reads (instead of a targeted number of reads), so the alloc always fails when using fractions.

Not sure if you'll want check before free at the bottom... I don't think it is needed, just for clarity/future.