diff mbox

[07/19] mount.cifs: eliminate some unneeded flags in parsed_mount_info

Message ID 1269613542-6402-8-git-send-email-jlayton@samba.org
State New
Headers show

Commit Message

Jeff Layton March 26, 2010, 2:25 p.m. UTC
From: Jeff Layton <jlayton@redhat.com>

Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 mount.cifs.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/mount.cifs.c b/mount.cifs.c
index b51e2a1..a86812c 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -132,7 +132,6 @@  struct parsed_mount_info {
 	char		username[MAX_USERNAME_SIZE + 1];
 	char		password[MOUNT_PASSWD_SIZE + 1];
 	char		addrlist[MAX_ADDR_LIST_LEN];
-	unsigned int	got_domain:1;
 	unsigned int	got_user:1;
 	unsigned int	got_password:1;
 };
@@ -326,7 +325,6 @@  parse_username(char *rawuser, struct parsed_mount_info *parsed_info)
 		strlcpy(parsed_info->domain, rawuser,
 				sizeof(parsed_info->domain));
 		*(user++) = slash;
-		parsed_info->got_domain = 1;
 	} else {
 		user = rawuser;
 	}
@@ -429,7 +427,6 @@  static int open_cred_file(char *file_name, struct parsed_mount_info *parsed_info
                                 }
 
 				strlcpy(parsed_info->domain, temp_val, sizeof(parsed_info->domain));
-				parsed_info->got_domain = 1;
                         }
                 }
 
@@ -624,7 +621,6 @@  parse_options(const char *data, struct parsed_mount_info *parsed_info)
 				fprintf(stderr, "domain name too long\n");
 				return EX_USAGE;
 			}
-			parsed_info->got_domain = 1;
 			strlcpy(parsed_info->domain, value, sizeof(parsed_info->domain));
 			goto nocopy;
 		} else if (strncmp(data, "cred", 4) == 0) {
@@ -1230,7 +1226,6 @@  int main(int argc, char ** argv)
 			break;
 		case 'd':
 			strlcpy(parsed_info->domain, optarg, sizeof(parsed_info->domain));
-			parsed_info->got_domain = 1;
 			break;
 		case 'p':
 			strlcpy(parsed_info->password, optarg, sizeof(parsed_info->password));
@@ -1381,7 +1376,7 @@  int main(int argc, char ** argv)
 			sizeof(parsed_info->options));
 	}
 
-	if (parsed_info->got_domain) {
+	if (*parsed_info->domain) {
 		strlcat(parsed_info->options, ",domain=",
 			sizeof(parsed_info->options));
 		strlcat(parsed_info->options, parsed_info->domain,