aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2007-10-17 17:31:52 -0400
committerSteve French <sfrench@us.ibm.com>2007-10-17 17:31:52 -0400
commitd5d18501090179d557a4ca976d1c30bfaf5de091 (patch)
tree95775567aa85bf5bf2fa3ee8bf743b4d17b0152a /fs
parentc18c732ec6bf372aa959ca6534cbfc32e464defd (diff)
[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')
-rw-r--r--fs/cifs/cifsfs.c12
-rw-r--r--fs/cifs/netmisc.c5
2 files changed, 10 insertions, 7 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index abca6b084ed1..91ba32861c88 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -308,15 +308,15 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
308 seq_printf(s, ",domain=%s", 308 seq_printf(s, ",domain=%s",
309 cifs_sb->tcon->ses->domainName); 309 cifs_sb->tcon->ses->domainName);
310 } 310 }
311 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID) ||
312 !(cifs_sb->tcon->unix_ext))
313 seq_printf(s, ",uid=%d", cifs_sb->mnt_uid);
314 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID) ||
315 !(cifs_sb->tcon->unix_ext))
316 seq_printf(s, ",gid=%d", cifs_sb->mnt_gid);
311 } 317 }
312 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) 318 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)
313 seq_printf(s, ",posixpaths"); 319 seq_printf(s, ",posixpaths");
314 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID) ||
315 !(cifs_sb->tcon->unix_ext))
316 seq_printf(s, ",uid=%d", cifs_sb->mnt_uid);
317 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID) ||
318 !(cifs_sb->tcon->unix_ext))
319 seq_printf(s, ",gid=%d", cifs_sb->mnt_gid);
320 seq_printf(s, ",rsize=%d", cifs_sb->rsize); 320 seq_printf(s, ",rsize=%d", cifs_sb->rsize);
321 seq_printf(s, ",wsize=%d", cifs_sb->wsize); 321 seq_printf(s, ",wsize=%d", cifs_sb->wsize);
322 } 322 }
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
index 2bfed3f45d0f..9ae4941cd61d 100644
--- a/fs/cifs/netmisc.c
+++ b/fs/cifs/netmisc.c
@@ -899,8 +899,11 @@ struct timespec cnvrtDosUnixTm(__u16 date, __u16 time)
899 cERROR(1, ("illegal hours %d", st->Hours)); 899 cERROR(1, ("illegal hours %d", st->Hours));
900 days = sd->Day; 900 days = sd->Day;
901 month = sd->Month; 901 month = sd->Month;
902 if ((days > 31) || (month > 12)) 902 if ((days > 31) || (month > 12)) {
903 cERROR(1, ("illegal date, month %d day: %d", month, days)); 903 cERROR(1, ("illegal date, month %d day: %d", month, days));
904 if (month > 12)
905 month = 12;
906 }
904 month -= 1; 907 month -= 1;
905 days += total_days_of_prev_months[month]; 908 days += total_days_of_prev_months[month];
906 days += 3652; /* account for difference in days between 1980 and 1970 */ 909 days += 3652; /* account for difference in days between 1980 and 1970 */