Commit 5f1ebdf6 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Don't declare variables in a switch-case

parent 7dd8ab38
......@@ -468,6 +468,7 @@ void write_output_single(struct engine* e, struct UnitSystem* us) {
int numFiles = 1;
struct part* parts = e->s->parts;
struct gpart* gparts = e->s->gparts;
struct gpart* dmparts = NULL;
static int outputCount = 0;
/* Number of particles of each type */
......@@ -575,7 +576,6 @@ void write_output_single(struct engine* e, struct UnitSystem* us) {
case DM:
/* Allocate temporary array */
struct gpart* dmparts = NULL;
if (posix_memalign((void*)&dmparts, gpart_align,
Ndm * sizeof(struct gpart)) != 0)
error("Error while allocating temporart memory for DM particles");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment