summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bundle-uri.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/bundle-uri.c b/bundle-uri.c
index 96d2ba726d..13a42f9238 100644
--- a/bundle-uri.c
+++ b/bundle-uri.c
@@ -532,11 +532,13 @@ static int fetch_bundles_by_token(struct repository *r,
*/
if (!repo_config_get_value(r,
"fetch.bundlecreationtoken",
- &creationTokenStr) &&
- sscanf(creationTokenStr, "%"PRIu64, &maxCreationToken) == 1 &&
- bundles.items[0]->creationToken <= maxCreationToken) {
- free(bundles.items);
- return 0;
+ &creationTokenStr)) {
+ if (sscanf(creationTokenStr, "%"PRIu64, &maxCreationToken) != 1)
+ maxCreationToken = 0;
+ if (bundles.items[0]->creationToken <= maxCreationToken) {
+ free(bundles.items);
+ return 0;
+ }
}
/*