From patchwork Fri Mar 26 14:25:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 48639 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.samba.org (fn.samba.org [216.83.154.106]) by ozlabs.org (Postfix) with ESMTP id 3D393B7CE7 for ; Sat, 27 Mar 2010 01:26:01 +1100 (EST) Received: from fn.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id ECFDB46679; Fri, 26 Mar 2010 08:26:00 -0600 (MDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on fn.samba.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.8 tests=BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS,SPF_NEUTRAL autolearn=ham version=3.2.5 X-Original-To: linux-cifs-client@lists.samba.org Delivered-To: linux-cifs-client@lists.samba.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by lists.samba.org (Postfix) with ESMTP id 415134664A for ; Fri, 26 Mar 2010 08:25:46 -0600 (MDT) Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2QEPiof007499 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 26 Mar 2010 10:25:45 -0400 Received: from localhost.localdomain (vpn-10-105.rdu.redhat.com [10.11.10.105]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2QEPdCc026868 for ; Fri, 26 Mar 2010 10:25:44 -0400 From: Jeff Layton To: linux-cifs-client@lists.samba.org Date: Fri, 26 Mar 2010 10:25:30 -0400 Message-Id: <1269613542-6402-8-git-send-email-jlayton@samba.org> In-Reply-To: <1269613542-6402-1-git-send-email-jlayton@samba.org> References: <1269613542-6402-1-git-send-email-jlayton@samba.org> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 Subject: [linux-cifs-client] [PATCH 07/19] mount.cifs: eliminate some unneeded flags in parsed_mount_info X-BeenThere: linux-cifs-client@lists.samba.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: The Linux CIFS VFS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-cifs-client-bounces@lists.samba.org Errors-To: linux-cifs-client-bounces@lists.samba.org From: Jeff Layton Signed-off-by: Jeff Layton --- mount.cifs.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) 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,