From patchwork Sat Oct 1 07:47:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9360095 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 66C30601C0 for ; Mon, 3 Oct 2016 07:13:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50DFE289A2 for ; Mon, 3 Oct 2016 07:13:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45D3B289AC; Mon, 3 Oct 2016 07:13:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D8942289A2 for ; Mon, 3 Oct 2016 07:13:51 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u937BR4L006830; Mon, 3 Oct 2016 03:11:27 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u917llPJ024858 for ; Sat, 1 Oct 2016 03:47:47 -0400 Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u917lkVH021353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 1 Oct 2016 03:47:47 -0400 Received: from mout.web.de (mout.web.de [212.227.17.11]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EF961C0B2A3B; Sat, 1 Oct 2016 07:47:45 +0000 (UTC) Received: from [192.168.1.3] ([92.228.150.161]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0MMW2M-1bqnnC1wY2-008L0a; Sat, 01 Oct 2016 09:47:44 +0200 To: dm-devel@redhat.com, linux-raid@vger.kernel.org, Alasdair Kergon , Mike Snitzer , Shaohua Li References: <45984567-4421-5f8d-ddf3-eb2a769a1860@users.sourceforge.net> From: SF Markus Elfring Message-ID: Date: Sat, 1 Oct 2016 09:47:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <45984567-4421-5f8d-ddf3-eb2a769a1860@users.sourceforge.net> X-Provags-ID: V03:K0:qge3BAN06QHauK/vqUGcpezN2VGF1S7vAKrN/GfuS8A3bUFTX9g WDcv6e/9z+BiEaUi4qLe5mkZ1pYNEfBhBno7Y71K1n0VO8MKlvklC4muL5MnIp51+Q83xHL 83dX9oOkjXAqCTGHvBrH28SSiUx+Q/1eCHc/dS/QxChMWSTNIWAkewf2e+cEI7RKCNNImiM xTXXDe8IoS/ZYoJBpU/mA== X-UI-Out-Filterresults: notjunk:1; V01:K0:WOGOXPUIVu4=:wVIYjFfyGYIg/62UiFpjku dIzxJbsKb5l+AfH7OHMJhI471SDgue0iEyouHNi30EdyxPMFZx507tHyCV2JdoOorJF3TEEiK fXXSwVqX12X/uPkG7FTDYhUHj8DyBuROnjZRZmud9uJjLofhTJ5r5+3LPhV1ugSO8BOCI/m6a Ld5q6v0+bN/cdFmZEQv2I6wKIEdnnVamJ2eawPmVtpFG7MDEVJLv+FQDrKqI7YSR/lmgG5R0m 47CGlIq2YkN8DFM4SqeoKsPut01Q+6NFSLRryTlUENgH4WcqzrzajE5w9DOCWYL9tihpHfHN0 9lNjz78K+RMgHsjXk/Up3jPit0tOcsEFHX8yeRQqHYvG2j6COzV20JfJ/pxtumG4HS/2/Lfs1 uGoBzhtV+zGUdTNa9PYuhaI7nmP1PpVLCGIbt2LcSZAKmXHlBcBLsM3YwB1RjGjepLbTR0Kb4 Ngi3zDaQ4Jws8hn8wq+C2PZuYbnYFRUKQzWj73y5m3Sqxz0gmCGPlr2HW6FMUr6zh0+DIwlIH niE8zJG0mL0vpDeBhjQnEfYrXCW7qeffLy4wQx3S/9aqli6/aLorfSJPlqW/P32Pg1K9rXy3X jM/KhLGYPGhQdjOmwP2PG5vEQpm9VMNgEjspRzuzIVy7EvtzgTd2BzROnlI2t+/NSPnMlupCG NOXa6Chq/PweS3s60v1VRZk+2pn6TyxcOB5l33156ejJlG5kt0XjEDwHts9xwzsNOfq12nOyI 8cPN4kDURjoKVvOAHn32XrMvKyN9MB27zQqH0gqlSHZYMhDdeetwVhRTDQNCVevT8cUhq2r9r FoI2iej X-Greylist: Sender IP whitelisted by DNSRBL, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Sat, 01 Oct 2016 07:47:46 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Sat, 01 Oct 2016 07:47:46 +0000 (UTC) for IP:'212.227.17.11' DOMAIN:'mout.web.de' HELO:'mout.web.de' FROM:'elfring@users.sourceforge.net' RCPT:'' X-RedHat-Spam-Score: 0.079 (BAYES_50, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 212.227.17.11 mout.web.de 212.227.17.11 mout.web.de X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Mon, 03 Oct 2016 03:10:51 -0400 Cc: Julia Lawall , kernel-janitors@vger.kernel.org, LKML Subject: [dm-devel] [PATCH 5/9] md/dm-table: Move an assignment for the variable "end" in dm_split_args() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sat, 1 Oct 2016 07:51:55 +0200 Move the assignment for the local variable "end" behind the source code for the initial two condition checks by this function. Signed-off-by: Markus Elfring --- drivers/md/dm-table.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index e74763c..0f60417 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -538,7 +538,7 @@ static char **realloc_argv(unsigned *array_size, char **old_argv) */ int dm_split_args(int *argc, char ***argvp, char *input) { - char *start, *end = input, *out, **argv; + char *start, *end, *out, **argv; unsigned array_size = 0; *argc = 0; @@ -552,6 +552,7 @@ int dm_split_args(int *argc, char ***argvp, char *input) if (!argv) return -ENOMEM; + end = input; while (1) { /* Skip whitespace */ start = skip_spaces(end);