Skip to content

Commit

Permalink
Fix finfo flag tracking during palloc_init
Browse files Browse the repository at this point in the history
  • Loading branch information
finwo committed Mar 17, 2024
1 parent 024b7f3 commit 2e146b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/palloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ PALLOC_RESPONSE palloc_init(PALLOC_FD fd, PALLOC_FLAGS flags) {
}

// Build & write new header
PALLOC_FLAGS nflags = PALLOC_HTOBE_FLAGS(flags & (~PALLOC_SYNC));
finfo->flags = flags;
PALLOC_FLAGS nflags = PALLOC_HTOBE_FLAGS(finfo->flags & (~PALLOC_SYNC));
memcpy(hdr, expected_header, expected_header_size);
memcpy(hdr + expected_header_size, &nflags, sizeof(PALLOC_FLAGS));
seek_os(fd, 0, SEEK_SET);
Expand Down

0 comments on commit 2e146b8

Please sign in to comment.