From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f176.google.com (mail-ob0-f176.google.com [209.85.214.176]) by dpdk.org (Postfix) with ESMTP id 8F06DB39B for ; Thu, 18 Sep 2014 09:41:11 +0200 (CEST) Received: by mail-ob0-f176.google.com with SMTP id uz6so368590obc.21 for ; Thu, 18 Sep 2014 00:46:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=364tDesVJSIzVUHQgriW7kGQiFHtJtogld/u0A1+JZk=; b=aZTBmDLww8AQD5s+DAiKRGFUOZ7HmnH5/oFHm1HWOBnyMbPwCLxObMO29oIa97s6zp IMnu3q7FyvjCGKqL1dvDyzscNuBMlVAWnCXALSK94rPfQ6J/KGRcnABSTCK5+t62NbGj oTIdWbTnqkX7RrOQNwqkHWC8tpnNt2dGobTzdvN1nuoDPGalTWRUD+vbJWGTiU2OR2wf XIswTYCvSOsWUIxfJIx914/uf3SQE0a9/h6h9/GCxoKTy4lVMk/F8PMa5O37RN1Qzlb4 AOZj3vPgwSKUKCQjwqpKn0txoPwgP9itbc8iGnFTKZAj2cgxoSdOSeOkCEwojYDYw7hw 0W2Q== X-Gm-Message-State: ALoCoQlkB/M8GLcBH56CZLDpFT6mXGDd8LXgL4Vngr4z7e4IJBS7aeWVfuIdiOOZnWh/qXPGsoN4 MIME-Version: 1.0 X-Received: by 10.202.198.137 with SMTP id w131mr24907oif.41.1411026414973; Thu, 18 Sep 2014 00:46:54 -0700 (PDT) Received: by 10.202.13.21 with HTTP; Thu, 18 Sep 2014 00:46:54 -0700 (PDT) In-Reply-To: <20140917144531.GB4213@localhost.localdomain> 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> Date: Thu, 18 Sep 2014 09:46:54 +0200 Message-ID: From: David Marchand To: Neil Horman Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 07:41:11 -0000 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). -- David Marchand