diff options
author | Rob Herring <rob.herring@calxeda.com> | 2012-11-07 17:59:14 -0600 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2012-11-07 17:59:14 -0600 |
commit | d3ad4a60a1b1448e59914eebefe1ccc8e64f9e2f (patch) | |
tree | f0862d1905a599cdbad86fcc8816d86a6f33459f /fs/nfs/dns_resolve.c | |
parent | e095c0d122c09efabe7d4136ce77f72c636c4879 (diff) | |
parent | e5c5f2adeb370559f4b221d57214db85858b786a (diff) |
Merge remote-tracking branch 'arm-soc/devel/debug_ll_init' into debug_ll
Diffstat (limited to 'fs/nfs/dns_resolve.c')
-rw-r--r-- | fs/nfs/dns_resolve.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c index 31c26c4dcc2..ca4b11ec87a 100644 --- a/fs/nfs/dns_resolve.c +++ b/fs/nfs/dns_resolve.c @@ -217,7 +217,7 @@ static int nfs_dns_parse(struct cache_detail *cd, char *buf, int buflen) { char buf1[NFS_DNS_HOSTNAME_MAXLEN+1]; struct nfs_dns_ent key, *item; - unsigned long ttl; + unsigned int ttl; ssize_t len; int ret = -EINVAL; @@ -240,7 +240,8 @@ static int nfs_dns_parse(struct cache_detail *cd, char *buf, int buflen) key.namelen = len; memset(&key.h, 0, sizeof(key.h)); - ttl = get_expiry(&buf); + if (get_uint(&buf, &ttl) < 0) + goto out; if (ttl == 0) goto out; key.h.expiry_time = ttl + seconds_since_boot(); |