Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/52345/?format=api
http://patches.dpdk.org/api/patches/52345/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190405134511.49066-5-bruce.richardson@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20190405134511.49066-5-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190405134511.49066-5-bruce.richardson@intel.com", "date": "2019-04-05T13:45:10", "name": "[4/5] app/testpmd: fix variable use before NULL check", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "b409da3581972cb2b54abfee5ab83c7b57359313", "submitter": { "id": 20, "url": "http://patches.dpdk.org/api/people/20/?format=api", "name": "Bruce Richardson", "email": "bruce.richardson@intel.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190405134511.49066-5-bruce.richardson@intel.com/mbox/", "series": [ { "id": 4138, "url": "http://patches.dpdk.org/api/series/4138/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4138", "date": "2019-04-05T13:45:06", "name": "some small fixes", "version": 1, "mbox": "http://patches.dpdk.org/series/4138/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/52345/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/52345/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C3ADB1B529;\n\tFri, 5 Apr 2019 15:45:39 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id BB8281B4F4;\n\tFri, 5 Apr 2019 15:45:36 +0200 (CEST)", "from fmsmga007.fm.intel.com ([10.253.24.52])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t05 Apr 2019 06:45:36 -0700", "from silpixa00399126.ir.intel.com (HELO\n\tsilpixa00399126.ger.corp.intel.com) ([10.237.222.236])\n\tby fmsmga007.fm.intel.com with ESMTP; 05 Apr 2019 06:45:34 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.60,312,1549958400\"; d=\"scan'208\";a=\"140383749\"", "From": "Bruce Richardson <bruce.richardson@intel.com>", "To": "dev@dpdk.org", "Cc": "Bruce Richardson <bruce.richardson@intel.com>, wei.dai@intel.com,\n\tstable@dpdk.org, Bernard Iremonger <bernard.iremonger@intel.com>,\n\tWenzhuo Lu <wenzhuo.lu@intel.com>", "Date": "Fri, 5 Apr 2019 14:45:10 +0100", "Message-Id": "<20190405134511.49066-5-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20190405134511.49066-1-bruce.richardson@intel.com>", "References": "<20190405134511.49066-1-bruce.richardson@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 4/5] app/testpmd: fix variable use before NULL\n\tcheck", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "The value returned from rte_eth_dev_tx_offload_name() function is used\nfor string comparison before being checked for NULL. Move the NULL check\nup to be done first.\n\nCoverity issue: 279438\nFixes: c73a9071877a (\"app/testpmd: add commands to test new offload API\")\nCc: wei.dai@intel.com\nCc: stable@dpdk.org\nCc: Bernard Iremonger <bernard.iremonger@intel.com>\nCc: Wenzhuo Lu <wenzhuo.lu@intel.com>\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n app/test-pmd/cmdline.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)", "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex ee50e4566..2155ff241 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -18306,13 +18306,13 @@ search_tx_offload(const char *name)\n \tsingle_offload = 1;\n \tfor (bit = 0; bit < sizeof(single_offload) * CHAR_BIT; bit++) {\n \t\tsingle_name = rte_eth_dev_tx_offload_name(single_offload);\n+\t\tif (single_name == NULL)\n+\t\t\tbreak;\n \t\tif (!strcasecmp(single_name, name)) {\n \t\t\tfound = 1;\n \t\t\tbreak;\n \t\t} else if (!strcasecmp(single_name, \"UNKNOWN\"))\n \t\t\tbreak;\n-\t\telse if (single_name == NULL)\n-\t\t\tbreak;\n \t\tsingle_offload <<= 1;\n \t}\n \n", "prefixes": [ "4/5" ] }{ "id": 52345, "url": "