diff options
author | Sverker Eriksson <[email protected]> | 2017-01-16 20:43:25 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-01-16 20:43:25 +0100 |
commit | 228e34eb3eb75dd0cac1c7137861ee4a7b5b3f69 (patch) | |
tree | 78e7b800eb387aeceb9a6e9bc3dc0500fdad4479 /erts/emulator/beam/beam_load.c | |
parent | e4f93595aba76c2eda2d2efef175ea9d72ee5d29 (diff) | |
parent | bca5bf5a2d68a0e9ca681363a8943809c4751950 (diff) | |
download | otp-228e34eb3eb75dd0cac1c7137861ee4a7b5b3f69.tar.gz otp-228e34eb3eb75dd0cac1c7137861ee4a7b5b3f69.tar.bz2 otp-228e34eb3eb75dd0cac1c7137861ee4a7b5b3f69.zip |
Merge branch 'maint-19' into maint
Diffstat (limited to 'erts/emulator/beam/beam_load.c')
-rw-r--r-- | erts/emulator/beam/beam_load.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c index 0afdedf6c2..3f2bdf3f9d 100644 --- a/erts/emulator/beam/beam_load.c +++ b/erts/emulator/beam/beam_load.c @@ -797,14 +797,14 @@ erts_finish_loading(Binary* magic, Process* c_p, } else { ErtsCodeIndex code_ix = erts_staging_code_ix(); Eterm module = stp->module; - int i; + int i, num_exps; /* * There is an -on_load() function. We will keep the current * code, but we must turn off any tracing. */ - - for (i = 0; i < export_list_size(code_ix); i++) { + num_exps = export_list_size(code_ix); + for (i = 0; i < num_exps; i++) { Export *ep = export_list(i, code_ix); if (ep == NULL || ep->code[0] != module) { continue; @@ -5754,12 +5754,13 @@ exported_from_module(Process* p, /* Process whose heap to use. */ ErtsCodeIndex code_ix, Eterm mod) /* Tagged atom for module. */ { - int i; + int i, num_exps; Eterm* hp = NULL; Eterm* hend = NULL; Eterm result = NIL; - for (i = 0; i < export_list_size(code_ix); i++) { + num_exps = export_list_size(code_ix); + for (i = 0; i < num_exps; i++) { Export* ep = export_list(i,code_ix); if (ep->code[0] == mod) { |