Merge pull request #203 from urbit/msl/fix-pma-file-extension-macos

pma: declare `_bt_falloc` iterator variables before `start` label
This commit is contained in:
Matthew LeVan 2024-01-18 16:44:21 -05:00 committed by GitHub
commit 9d16f1807f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2391,9 +2391,11 @@ _bt_falloc(BT_state *state, size_t pages)
{
/* walk the persistent file freelist and return a pgno with sufficient
contiguous space for pages */
BT_flistnode **n;
pgno_t ret;
start:
BT_flistnode **n = &state->flist;
pgno_t ret = 0;
n = &state->flist;
ret = 0;
/* first fit */
for (; *n; n = &(*n)->next) {