X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Futil.c;h=adf79a0a799b34288265f8b2eeff3aeda24c5242;hb=bf40ae88bc289fd765a33861cc4bc0853ed483ba;hp=7568d5cc25a0a3564d51ac64f7144ad3bcb85f30;hpb=a18f0a95bc9a457e4d2d00c702b746f29c2662b1;p=sbcl.git diff --git a/src/runtime/util.c b/src/runtime/util.c index 7568d5c..adf79a0 100644 --- a/src/runtime/util.c +++ b/src/runtime/util.c @@ -40,24 +40,24 @@ voidacc_acc(struct voidacc *va, void* x) { /* Ensure that we have enough space, or die. */ if (va->n_used >= va->n_avail) { /* if we've run out of space */ - /* We need to allocate more space. */ + /* We need to allocate more space. */ int new_n_avail = 1 + 2 * va->n_avail; void** new_result = (void**)calloc(sizeof(void*), new_n_avail); int i; - if (!new_result) { - return 1; - } + if (!new_result) { + return 1; + } /* Copy old result into new space. */ - for (i = va->n_used; --i >= 0; ) { - new_result[i] = va->result[i]; - } - free(va->result); - va->result = new_result; - va->n_avail = new_n_avail; + for (i = va->n_used; --i >= 0; ) { + new_result[i] = va->result[i]; + } + free(va->result); + va->result = new_result; + va->n_avail = new_n_avail; } - /* If we get to this point, we have enough space to store x. - * + /* If we get to this point, we have enough space to store x. + * * Note that since we cleverly counted the 0 as part of the space * used, now we need to subtract one to get the correct offset to * write into.:-| */ @@ -69,7 +69,7 @@ void** voidacc_give_away_result(struct voidacc *va) { /* (We could do realloc(3) here to try to shrink the result down - * to minimum size, but that's not really needed for the the + * to minimum size, but that's not really needed for the * directory-iteration application this was originally written * for, so for now we just do the simplest thing which could * possibly work.) */