From c89fa1b2211beff38c6e8ad18fe2b3b7e67a95e8 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 31 Mar 2023 15:35:49 +0200 Subject: Factorise p->masks[j] Just to avoid repetition --- libcrystfel/src/datatemplate.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/datatemplate.c b/libcrystfel/src/datatemplate.c index 0144561d..0ddbe107 100644 --- a/libcrystfel/src/datatemplate.c +++ b/libcrystfel/src/datatemplate.c @@ -1339,8 +1339,12 @@ DataTemplate *data_template_new_from_string(const char *string_in) } for ( j=0; jmasks[j].filename != NULL) - && (p->masks[j].data_location == NULL) ) + + struct mask_template *mt; + mt = &p->masks[j]; + + if ( (mt->filename != NULL) + && (mt->data_location == NULL) ) { ERROR("You have specified filename but not data" " location for mask %i of panel %s\n", -- cgit v1.2.3