[dpdk-dev] [PATCH v3 20/20] eal: set log level from command line

Neil Horman nhorman at tuxdriver.com
Thu Sep 18 12:27:02 CEST 2014


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 at 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


More information about the dev mailing list