From 3de93a0ec93bab8c7bae8f1e34d61ae260a21583 Mon Sep 17 00:00:00 2001 From: Kostis Sagonas Date: Wed, 13 Feb 2013 09:07:48 +0100 Subject: Change the return value of hipe_bifs:remove_refs_from/1 In order to avoid an ummatched return warning in erts and make the code more sane, the return value of the bif was changed from [] to 'ok'. (Probably more hipe_bifs need such changes but they will have to wait.) While at it, the code of various functions in hipe_unified_loader was shortened by using lists:foreach/1 instead of explicit recursion. --- erts/emulator/hipe/hipe_bif0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'erts/emulator/hipe') diff --git a/erts/emulator/hipe/hipe_bif0.c b/erts/emulator/hipe/hipe_bif0.c index 1562748f2d..059c013322 100644 --- a/erts/emulator/hipe/hipe_bif0.c +++ b/erts/emulator/hipe/hipe_bif0.c @@ -1791,7 +1791,7 @@ BIF_RETTYPE hipe_bifs_remove_refs_from_1(BIF_ALIST_1) if (BIF_ARG_1 == am_all) { hipe_purge_all_refs(); - BIF_RET(NIL); + BIF_RET(am_ok); } if (!term_to_mfa(BIF_ARG_1, &mfa)) @@ -1828,7 +1828,7 @@ BIF_RETTYPE hipe_bifs_remove_refs_from_1(BIF_ALIST_1) caller_mfa->refers_to = NULL; } hipe_mfa_info_table_unlock(); - BIF_RET(NIL); + BIF_RET(am_ok); } -- cgit v1.2.3