aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CheckpointRecovery.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/CheckpointRecovery.c b/src/CheckpointRecovery.c
index 786c9fc..a0563ef 100644
--- a/src/CheckpointRecovery.c
+++ b/src/CheckpointRecovery.c
@@ -619,26 +619,23 @@ int IOUtil_RecoverParameters (int (*recover_fn) (cGH *GH,
break;
}
}
- if (*p != '.')
- {
- continue;
- }
/* check for a '.file_<processor>' suffix for chunked output */
- if (! strncmp (p, ".file_", 6))
+ q = p;
+ if (! strncmp (q, ".file_", 6))
{
- continue;
- }
-
- /* read past the <processor> number and check the file extension suffix */
- for (q = p + 6; *q && *q != '.'; q++)
- {
- if (! isdigit ((int) *q))
+ /* read past the <processor> number */
+ for (q = q + 6; *q && *q != '.'; q++)
{
- break;
+ if (! isdigit ((int) *q))
+ {
+ break;
+ }
}
}
- if (*q != '.' || strcmp (q + 1, fileExtension))
+
+ /* finally check the file extension suffix */
+ if (*q != '.' || strcmp (q, fileExtension))
{
continue;
}