aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/dist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
index 16a7bd9eb3..ee288dc0bd 100644
--- a/erts/emulator/beam/dist.c
+++ b/erts/emulator/beam/dist.c
@@ -2335,10 +2335,10 @@ erts_dist_command(Port *prt, int initial_reds)
ASSERT(ob);
do {
reds = erts_encode_ext_dist_header_finalize(ob, dep, flags, reds);
- if (reds >= 0) {
- last_finalized = ob;
- ob = ob->next;
- }
+ if (reds < 0)
+ break;
+ last_finalized = ob;
+ ob = ob->next;
} while (ob);
if (last_finalized) {
/*