aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/datatemplate.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-07-21 15:22:12 +0200
committerThomas White <taw@physics.org>2021-07-22 11:22:18 +0200
commit13d65b9785d1557e29f5f06871d01bad8e76e44c (patch)
treedfd9c52a80639882695eb63b0c87af06ebcbb29d /libcrystfel/src/datatemplate.c
parentd5cf0404a08253f52c6ddf3f6d80e694b9de4e7a (diff)
Clean up shadowed variables
Diffstat (limited to 'libcrystfel/src/datatemplate.c')
-rw-r--r--libcrystfel/src/datatemplate.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libcrystfel/src/datatemplate.c b/libcrystfel/src/datatemplate.c
index a2b974a7..48fe4cfa 100644
--- a/libcrystfel/src/datatemplate.c
+++ b/libcrystfel/src/datatemplate.c
@@ -1122,10 +1122,10 @@ DataTemplate *data_template_new_from_string(const char *string_in)
/* Copy the next line from the big string */
const char *nl = strchr(string, '\n');
if ( nl != NULL ) {
- size_t len = nl - string;
- line = strndup(string, nl-string);
- line[len] = '\0';
- string += len+1;
+ size_t nlen = nl - string;
+ line = strndup(string, nlen);
+ line[nlen] = '\0';
+ string += nlen+1;
} else {
line = strdup(string);
done = 1;
@@ -1437,7 +1437,7 @@ DataTemplate *data_template_new_from_string(const char *string_in)
for ( rgci=0; rgci<n_rgc_definitions; rgci++ ) {
- int rgi, n2;
+ int n2;
struct rg_collection *rgcollection = NULL;
rgcollection = find_or_add_rg_coll(dt, rgc_defl[rgci]->name);