From ad4746363bffc56d379e421fec5f1733476faef5 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 3 Jun 2010 17:33:49 +0200 Subject: indexamajig: Care over initialisation of results --- src/indexamajig.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') 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; -- cgit v1.2.3