From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <nhorman@tuxdriver.com>
Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58])
 by dpdk.org (Postfix) with ESMTP id 0B8CF68C2
 for <dev@dpdk.org>; Thu, 18 Sep 2014 12:21:27 +0200 (CEST)
Received: from hmsreliant.think-freely.org
 ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost)
 by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63)
 (envelope-from <nhorman@tuxdriver.com>)
 id 1XUYvX-0000a2-Ke; Thu, 18 Sep 2014 06:27:09 -0400
Date: Thu, 18 Sep 2014 06:27:02 -0400
From: Neil Horman <nhorman@tuxdriver.com>
To: David Marchand <david.marchand@6wind.com>
Message-ID: <20140918102702.GB20389@hmsreliant.think-freely.org>
References: <1410961612-8571-1-git-send-email-david.marchand@6wind.com>
 <1410961612-8571-21-git-send-email-david.marchand@6wind.com>
 <20140917144531.GB4213@localhost.localdomain>
 <CALwxeUumccXr2BEwAH-RNqa2-sJ7aQnBu5TaHS-EuUp1-ip7Lw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CALwxeUumccXr2BEwAH-RNqa2-sJ7aQnBu5TaHS-EuUp1-ip7Lw@mail.gmail.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
X-Spam-Score: -2.9 (--)
X-Spam-Status: No
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3 20/20] eal: set log level from command line
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Sep 2014 10:21:27 -0000

On Thu, Sep 18, 2014 at 09:46:54AM +0200, David Marchand wrote:
> Hello Neil,
> 
> 
> On Wed, Sep 17, 2014 at 4:45 PM, Neil Horman <nhorman@tuxdriver.com> wrote:
> 
> >
> > This is a nit, but since you're working in this code anyway, would you mind
> > fixing the long options parsing please?  Instead of having a single case
> > statement that just does a never ending if..else..if series of strcmps that
> > could possibly cause a stack overflow, you can set the val value in the
> > lgopts
> > array to a unique value for each option and just have a set of case
> > statements.
> > It would look a lot more readable and exeucte more safely.
> >
> 
> I agree, but I will send it in a different patchset: already made some
> changes, it builds fine (at least on my linux), but I want to check it
> actually works and maybe more cleanups can be done there (merging bsd and
> linux code).
> 
Thats fine with me, thanks!
Neil

> -- 
> David Marchand