From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 3DD42A05FE for ; Mon, 18 Mar 2019 16:27:16 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E051A4C95; Mon, 18 Mar 2019 16:27:15 +0100 (CET) Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by dpdk.org (Postfix) with ESMTP id BA0312C60 for ; Mon, 18 Mar 2019 16:27:11 +0100 (CET) Received: by mail-pg1-f178.google.com with SMTP id h34so11602645pgh.11 for ; Mon, 18 Mar 2019 08:27:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J8y9MhMgL0o1HOnEWLHjQMCLN+dH4bYA5V0YMet0hJ4=; b=iKQJXipKBTPLdhJjNjh7gx3o8UsC7e5sudd305F7d6AoIqY4j6Yp92FNRic8f8/FZ7 9GevoE8do2Qqjap7BibI3gKzo3dd97RTajF4nfbJh4Ny6NfzAli3azss/hsNAZcSP35+ vjDX/Ajuw9VzlHbrUD4C8TmYl2QA/jxUbsxX9ETzjH/Y9zOiEnWF5ZSOe6r+4AQw17oQ qgEOe2xffzRs4N7Yyl6EEwNIPfVBfd/+mlXyd5IDDzjTsTCWhdwZPAvNFBBy1gtnfS+o vE0KcJ6XswWTClKV9F9hHTjBSe5fbMExkkGKjqjEPTpwcOFVxqDBUTXx11oNU7ORyN92 1Mbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J8y9MhMgL0o1HOnEWLHjQMCLN+dH4bYA5V0YMet0hJ4=; b=qBrwEVnNmAnW2jCeyGf5s+ExNltzc+so56svBm21+Qhki+YCdmWGfO8r3vbKAHpOy6 HV+zZo8Kp2xiAGFtHBuh9X3wr/PIHGXiZ55wSSGhqpAqbVi+Y+UtnUuLZFv49mn3DetW 12fPMIeQCtxlsXtFw2s235raZPqQdEyRdU56ICoOBLMoh091N39D42UDrQINN4iL+PWf WiGF+cL2R6NTDm0GQfGuIW3cTCQVJEfYQiinDl3HUBvfyTKN8d3ynWLOlDJ/mAdOe/2I oWuX3Ub+EHYfrM5tcxNiRno3Zqd5VY/qY1b8uBlLXQSO9hnkNu0Q6Fs15e6hhQcLzpPq D6kA== X-Gm-Message-State: APjAAAVpC+JpQpFzuW0S+6ewqYUXfxePxAhXVXswvLC7kuJMuMyeyswU I0N/YCKoKUDTSe7awt0U5lbjgg== X-Google-Smtp-Source: APXvYqzdOkZEVjIGmx1EcyQvhmPlhBaeJC5fasRPRac6zg4AOmogE0Fu42qMjrJrQKEEAFPeF6xj4Q== X-Received: by 2002:a65:4381:: with SMTP id m1mr17021529pgp.97.1552922830966; Mon, 18 Mar 2019 08:27:10 -0700 (PDT) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j9sm18344540pfc.67.2019.03.18.08.27.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Mar 2019 08:27:10 -0700 (PDT) Date: Mon, 18 Mar 2019 08:27:07 -0700 From: Stephen Hemminger To: Wei Zhao Cc: dev@dpdk.org, stable@dpdk.org, qi.z.zhang@intel.com, adrien.mazarguil@6wind.com Message-ID: <20190318082707.1dfb60d7@shemminger-XPS-13-9360> In-Reply-To: <1552639435-68184-1-git-send-email-wei.zhao1@intel.com> References: <1552639435-68184-1-git-send-email-wei.zhao1@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] app/testpmd: fix support of hex string parser for flow API X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Fri, 15 Mar 2019 16:43:55 +0800 Wei Zhao wrote: > + /* Check input parameters */ > + if ((src == NULL) || > + (dst == NULL) || > + (size == NULL) || > + (*size == 0)) > + return -1; > + if ((*size & 1) != 0) > + return -1; > + > + for (c = src, i = 0; i < *size; c++, i++) { > + if ((((*c) >= '0') && ((*c) <= '9')) || > + (((*c) >= 'A') && ((*c) <= 'F')) || > + (((*c) >= 'a') && ((*c) <= 'f'))) > + continue; > + Excessive number of parens here. You don't need them around (*c) Why did you not use isxdigit() instead?