Skip to content
Snippets Groups Projects
Commit 5f1ebdf6 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Don't declare variables in a switch-case

parent 7dd8ab38
No related branches found
No related tags found
2 merge requests!136Master,!116Basic implementation of gparts
...@@ -468,6 +468,7 @@ void write_output_single(struct engine* e, struct UnitSystem* us) { ...@@ -468,6 +468,7 @@ void write_output_single(struct engine* e, struct UnitSystem* us) {
int numFiles = 1; int numFiles = 1;
struct part* parts = e->s->parts; struct part* parts = e->s->parts;
struct gpart* gparts = e->s->gparts; struct gpart* gparts = e->s->gparts;
struct gpart* dmparts = NULL;
static int outputCount = 0; static int outputCount = 0;
/* Number of particles of each type */ /* Number of particles of each type */
...@@ -575,7 +576,6 @@ void write_output_single(struct engine* e, struct UnitSystem* us) { ...@@ -575,7 +576,6 @@ void write_output_single(struct engine* e, struct UnitSystem* us) {
case DM: case DM:
/* Allocate temporary array */ /* Allocate temporary array */
struct gpart* dmparts = NULL;
if (posix_memalign((void*)&dmparts, gpart_align, if (posix_memalign((void*)&dmparts, gpart_align,
Ndm * sizeof(struct gpart)) != 0) Ndm * sizeof(struct gpart)) != 0)
error("Error while allocating temporart memory for DM particles"); error("Error while allocating temporart memory for DM particles");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment