Skip to content

Commit

Permalink
[SQUASH ME] review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbonfield committed Feb 7, 2023
1 parent d0738d3 commit f913215
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions cram/cram_encode.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ cram_block *cram_encode_compression_header(cram_fd *fd, cram_container *c,
cram_block *map = cram_new_block(COMPRESSION_HEADER, 0);
int i, mc, r = 0;

pthread_mutex_lock(&fd->metrics_lock);
int no_ref = c->no_ref;
pthread_mutex_unlock(&fd->metrics_lock);

if (!cb || !map)
return NULL;
Expand Down Expand Up @@ -3911,7 +3909,6 @@ int cram_put_bam_seq(cram_fd *fd, bam_seq_t *b) {
// within the container only, as multi_seq may be temporary
// and we switch back away from it again.
pthread_mutex_lock(&fd->ref_lock);
if (embed_ref + c->embed_ref + fd->embed_ref != 0)
if (fd->embed_ref > 0 && c->curr_rec == 0 && c->curr_slice == 0) {
hts_log_warning("Changing from embed_ref to no_ref mode");
// Should we update fd->embed_ref and no_ref here too?
Expand Down

0 comments on commit f913215

Please sign in to comment.