From a559aec9bcec0d2e47ba293d5b0a76bf6166cceb Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Thu, 30 Jul 2020 18:11:57 +0900 Subject: [PATCH] pass '() as user exception irritants, not NULL --- gc_heap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gc_heap.c b/gc_heap.c index 2f1c27e6..eb5a55a1 100644 --- a/gc_heap.c +++ b/gc_heap.c @@ -68,7 +68,7 @@ sexp sexp_gc_heap_walk(sexp ctx, } res = SEXP_TRUE; done: - if (res != SEXP_TRUE) res = sexp_user_exception(ctx, NULL, gc_heap_err_str, NULL); + if (res != SEXP_TRUE) res = sexp_user_exception(ctx, NULL, gc_heap_err_str, SEXP_NULL); return res; } @@ -233,7 +233,7 @@ done: } static sexp sexp_gc_heap_pack_adjust(sexp dstp, sexp* types, struct sexp_remap_state* state) { - sexp res = NULL; + sexp res = SEXP_FALSE; /* Adjust internal types which contain fields of sexp pointer(s) within in the heap */ if ((res = sexp_adjust_fields(dstp, types, sexp_gc_heap_pack_src_to_dst, state)) != SEXP_TRUE) { @@ -418,7 +418,7 @@ sexp sexp_save_image (sexp ctx_in, const char* filename) { done: if (fp) fclose(fp); if (heap) sexp_free_heap(heap); - if (res != SEXP_TRUE) res = sexp_user_exception(ctx_in, NULL, gc_heap_err_str, NULL); + if (res != SEXP_TRUE) res = sexp_user_exception(ctx_in, NULL, gc_heap_err_str, SEXP_NULL); return res; }