aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-06-03 17:33:49 +0200
committerThomas White <taw@physics.org>2010-06-03 17:33:49 +0200
commitad4746363bffc56d379e421fec5f1733476faef5 (patch)
treeef121ea047366b6d0a47af5213b534375795c8c3 /src
parent8adfcda38ac78cd4eb081389af06ff3fc3ce0db8 (diff)
indexamajig: Care over initialisation of results
Diffstat (limited to 'src')
-rw-r--r--src/indexamajig.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 5c2868ef..c365048a 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -270,14 +270,14 @@ static void *process_image(void *pargsv)
result = malloc(sizeof(*result));
if ( result == NULL ) return NULL;
+ result->peaks_sane = 0;
+ result->hit = 0;
hdfile = hdfile_open(filename);
if ( hdfile == NULL ) {
- result->hit = 0;
return result;
} else if ( hdfile_set_first_image(hdfile, "/") ) {
ERROR("Couldn't select path\n");
- result->hit = 0;
return result;
}
@@ -325,13 +325,11 @@ static void *process_image(void *pargsv)
}
/* No cell at this point? Then we're done. */
- result->peaks_sane = 0;
if ( image.indexed_cell == NULL ) goto done;
/* Sanity check */
if ( !peak_sanity_check(&image, image.indexed_cell) ) {
STATUS("Failed peak sanity check.\n");
- result->peaks_sane = 0;
goto done;
} else {
result->peaks_sane = 1;