diff options
author | Steve French <sfrench@us.ibm.com> | 2007-10-17 21:31:52 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-10-17 21:31:52 +0000 |
commit | d5d18501090179d557a4ca976d1c30bfaf5de091 (patch) | |
tree | 95775567aa85bf5bf2fa3ee8bf743b4d17b0152a /fs/cifs/netmisc.c | |
parent | c18c732ec6bf372aa959ca6534cbfc32e464defd (diff) | |
download | linux-3.10-d5d18501090179d557a4ca976d1c30bfaf5de091.tar.gz linux-3.10-d5d18501090179d557a4ca976d1c30bfaf5de091.tar.bz2 linux-3.10-d5d18501090179d557a4ca976d1c30bfaf5de091.zip |
[CIFS] Fix minor problems noticed by scan
Coverity scan pointed out some minor possible errors.
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/netmisc.c')
-rw-r--r-- | fs/cifs/netmisc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c index 2bfed3f45d0..9ae4941cd61 100644 --- a/fs/cifs/netmisc.c +++ b/fs/cifs/netmisc.c @@ -899,8 +899,11 @@ struct timespec cnvrtDosUnixTm(__u16 date, __u16 time) cERROR(1, ("illegal hours %d", st->Hours)); days = sd->Day; month = sd->Month; - if ((days > 31) || (month > 12)) + if ((days > 31) || (month > 12)) { cERROR(1, ("illegal date, month %d day: %d", month, days)); + if (month > 12) + month = 12; + } month -= 1; days += total_days_of_prev_months[month]; days += 3652; /* account for difference in days between 1980 and 1970 */ |