Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5d18501 authored by Steve French's avatar Steve French
Browse files

[CIFS] Fix minor problems noticed by scan



Coverity scan pointed out some minor possible errors.

Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent c18c732e
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -308,15 +308,15 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
					seq_printf(s, ",domain=%s",
					seq_printf(s, ",domain=%s",
					   cifs_sb->tcon->ses->domainName);
					   cifs_sb->tcon->ses->domainName);
			}
			}
		}
		if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)
			seq_printf(s, ",posixpaths");
			if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID) ||
			if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID) ||
			   !(cifs_sb->tcon->unix_ext))
			   !(cifs_sb->tcon->unix_ext))
				seq_printf(s, ",uid=%d", cifs_sb->mnt_uid);
				seq_printf(s, ",uid=%d", cifs_sb->mnt_uid);
			if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID) ||
			if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID) ||
			   !(cifs_sb->tcon->unix_ext))
			   !(cifs_sb->tcon->unix_ext))
				seq_printf(s, ",gid=%d", cifs_sb->mnt_gid);
				seq_printf(s, ",gid=%d", cifs_sb->mnt_gid);
		}
		if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)
			seq_printf(s, ",posixpaths");
		seq_printf(s, ",rsize=%d", cifs_sb->rsize);
		seq_printf(s, ",rsize=%d", cifs_sb->rsize);
		seq_printf(s, ",wsize=%d", cifs_sb->wsize);
		seq_printf(s, ",wsize=%d", cifs_sb->wsize);
	}
	}
+4 −1
Original line number Original line Diff line number Diff line
@@ -899,8 +899,11 @@ struct timespec cnvrtDosUnixTm(__u16 date, __u16 time)
		cERROR(1, ("illegal hours %d", st->Hours));
		cERROR(1, ("illegal hours %d", st->Hours));
	days = sd->Day;
	days = sd->Day;
	month = sd->Month;
	month = sd->Month;
	if ((days > 31) || (month > 12))
	if ((days > 31) || (month > 12)) {
		cERROR(1, ("illegal date, month %d day: %d", month, days));
		cERROR(1, ("illegal date, month %d day: %d", month, days));
		if (month > 12)
			month = 12;
	}
	month -= 1;
	month -= 1;
	days += total_days_of_prev_months[month];
	days += total_days_of_prev_months[month];
	days += 3652; /* account for difference in days between 1980 and 1970 */
	days += 3652; /* account for difference in days between 1980 and 1970 */