diff --git a/transport.c b/transport.c
index 43666394df3627a3d066f84ae529101d6e9a9f92..cac0c065ff9f82011b204f932932283b01a5d034 100644 (file)
--- a/transport.c
+++ b/transport.c
} else if (!strcmp(name, TRANS_OPT_DEPTH)) {
if (!value)
opts->depth = 0;
- else
- opts->depth = atoi(value);
+ else {
+ char *end;
+ opts->depth = strtol(value, &end, 0);
+ if (*end)
+ die("transport: invalid depth option '%s'", value);
+ }
return 0;
}
return 1;
while (is_urlschemechar(p == url, *p))
p++;
- if (!prefixcmp(p, "::")) {
+ if (!prefixcmp(p, "::"))
helper = xstrndup(url, p - url);
- remote->foreign_vcs = helper;
- }
}
if (helper) {
char *handler = xmalloc(len + 1);
handler[len] = 0;
strncpy(handler, url, len);
- remote->foreign_vcs = handler;
transport_helper_init(ret, handler);
}