diff --git a/transport.c b/transport.c
index a99b7c9c457c4ac3b76dc6859507711f847e5f62..cac0c065ff9f82011b204f932932283b01a5d034 100644 (file)
--- a/transport.c
+++ b/transport.c
} else if (!strcmp(name, TRANS_OPT_DEPTH)) {
if (!value)
opts->depth = 0;
} 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;
return 0;
}
return 1;