From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 0B8CF68C2 for ; 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 ) id 1XUYvX-0000a2-Ke; Thu, 18 Sep 2014 06:27:09 -0400 Date: Thu, 18 Sep 2014 06:27:02 -0400 From: Neil Horman To: David Marchand 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: "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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 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