aboutsummaryrefslogtreecommitdiff
path: root/cache.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2005-02-24 16:37:54 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2005-02-24 16:37:54 +0000
commit9693a8bf05e5ef61a7a74ed14a985e7e16a037d8 (patch)
tree091afa4d513d7993dfbbe1d7da327b418ede5140 /cache.c
parent80748b39e4e9eb948e9b511222fcaee81473e931 (diff)
downloadsshfs-9693a8bf05e5ef61a7a74ed14a985e7e16a037d8.tar
sshfs-9693a8bf05e5ef61a7a74ed14a985e7e16a037d8.tar.gz
sshfs-9693a8bf05e5ef61a7a74ed14a985e7e16a037d8.tar.bz2
sshfs-9693a8bf05e5ef61a7a74ed14a985e7e16a037d8.zip
fix
Diffstat (limited to 'cache.c')
-rw-r--r--cache.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/cache.c b/cache.c
index 034121d..b3ccd60 100644
--- a/cache.c
+++ b/cache.c
@@ -486,21 +486,11 @@ static struct opt cache_opts[] = {
static int get_timeout(int sel, unsigned *timeoutp)
{
- char *end;
struct opt *o = &cache_opts[sel];
- unsigned val;
if (!o->present)
return 0;
- if (!o->value || !o->value[0]) {
- fprintf(stderr, "Missing value for '%s' option\n", o->optname);
+ if (opt_get_unsigned(o, timeoutp) == -1)
return -1;
- }
- val = strtoul(o->value, &end, 10);
- if (end[0]) {
- fprintf(stderr, "Invalid value for '%s' option\n", o->optname);
- return -1;
- }
- *timeoutp = val;
return 1;
}