aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/detector.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-01-21 11:12:55 +0100
committerThomas White <taw@physics.org>2014-01-21 11:24:47 +0100
commit233487cb155a6ad7a3f7443e6da90f3b08d2ff61 (patch)
treec4345893879697abb87c7a52cc98f85084df0979 /libcrystfel/src/detector.c
parent0fbadb5e611c0a1d480f2bae1ed0cbd302e6a7e9 (diff)
Fussiness
Diffstat (limited to 'libcrystfel/src/detector.c')
-rw-r--r--libcrystfel/src/detector.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c
index 2db7cfd2..a5dc12f7 100644
--- a/libcrystfel/src/detector.c
+++ b/libcrystfel/src/detector.c
@@ -3,12 +3,13 @@
*
* Detector properties
*
- * Copyright © 2012 Deutsches Elektronen-Synchrotron DESY,
- * a research centre of the Helmholtz Association.
+ * Copyright © 2012-2014 Deutsches Elektronen-Synchrotron DESY,
+ * a research centre of the Helmholtz Association.
* Copyright © 2012 Richard Kirian
*
* Authors:
- * 2009-2012 Thomas White <taw@physics.org>
+ * 2009-2014 Thomas White <taw@physics.org>
+ * 2014 Kenneth Beyerlein <kenneth.beyerlein@desy.de>
* 2011 Andrew Aquila
* 2011 Richard Kirian <rkirian@asu.edu>
*
@@ -588,14 +589,16 @@ static void add_to_rigid_group(struct rigid_group *rg, struct panel *p)
rg->panels[rg->n_panels++] = p;
}
-static void rigid_groups_free (struct detector *det)
+
+static void rigid_groups_free(struct detector *det)
{
int i;
- if ( det->rigid_groups == NULL) return;
- for ( i = 0; i < det->n_rigid_groups; i++ ){
- free( det->rigid_groups[i]->name );
- free( det->rigid_groups[i]->panels );
- free( det->rigid_groups[i] );
+
+ if ( det->rigid_groups == NULL ) return;
+ for ( i=0; i<det->n_rigid_groups; i++ ) {
+ free(det->rigid_groups[i]->name);
+ free(det->rigid_groups[i]->panels);
+ free(det->rigid_groups[i]);
}
free(det->rigid_groups);
}
@@ -1082,7 +1085,7 @@ void free_detector_geometry(struct detector *det)
rigid_groups_free(det);
- free( det->defaults.clen_from );
+ free(det->defaults.clen_from);
for ( i=0; i<det->n_panels; i++ ) {
free(det->panels[i].clen_from);