diff --git a/src/common_io.c b/src/common_io.c index 9e1eb0854c0cdeaa0e3db4d89ffcc12c2c458731..5ea80f651989022307c255c3ee935f701edfe3c5 100644 --- a/src/common_io.c +++ b/src/common_io.c @@ -378,7 +378,7 @@ void io_write_engine_policy(hid_t h_file, const struct engine* e) { const hid_t h_grp = H5Gcreate1(h_file, "/Policy", 0); if (h_grp < 0) error("Error while creating policy group"); - for (int i = 1; i <= engine_maxpolicy; ++i) + for (int i = 1; i < engine_maxpolicy; ++i) if (e->policy & (1 << i)) io_write_attribute_i(h_grp, engine_policy_names[i + 1], 1); else diff --git a/src/space.c b/src/space.c index 91d5c6ca0e842e9157e8b1c2df300a7d080ea778..5164236d5730e4119ad0f17ca5982dafd49c9a2d 100644 --- a/src/space.c +++ b/src/space.c @@ -2631,9 +2631,9 @@ void space_list_useful_top_level_cells(struct space *s) { s->nr_local_cells_with_tasks++; } - const int has_particles = (c->hydro.count > 0) || (c->grav.count > 0) || - (c->stars.count > 0) || - (c->grav.multipole != NULL && c->grav.multipole->m_pole.M_000 > 0.f); + const int has_particles = + (c->hydro.count > 0) || (c->grav.count > 0) || (c->stars.count > 0) || + (c->grav.multipole != NULL && c->grav.multipole->m_pole.M_000 > 0.f); if (has_particles) { s->cells_with_particles_top[s->nr_cells_with_particles] = i;