Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/127855/?format=api
https://patches.dpdk.org/api/patches/127855/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230601150106.18375-16-stephen@networkplumber.org/", "project": { "id": 1, "url": "https://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": "<20230601150106.18375-16-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20230601150106.18375-16-stephen@networkplumber.org", "date": "2023-06-01T15:00:56", "name": "[15/25] net/cxgbe: replace snprintf with strlcpy", "commit_ref": null, "pull_url": null, "state": "rejected", "archived": true, "hash": "aba0c526ef17298890513fb5da83f8558da5e389", "submitter": { "id": 27, "url": "https://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230601150106.18375-16-stephen@networkplumber.org/mbox/", "series": [ { "id": 28302, "url": "https://patches.dpdk.org/api/series/28302/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=28302", "date": "2023-06-01T15:00:41", "name": "replace snprintf with strlcpy", "version": 1, "mbox": "https://patches.dpdk.org/series/28302/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/127855/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/127855/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id CDB0142C04;\n\tThu, 1 Jun 2023 17:03:57 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9275342DB3;\n\tThu, 1 Jun 2023 17:01:33 +0200 (CEST)", "from mail-pl1-f180.google.com (mail-pl1-f180.google.com\n [209.85.214.180])\n by mails.dpdk.org (Postfix) with ESMTP id 96B7442D93\n for <dev@dpdk.org>; Thu, 1 Jun 2023 17:01:30 +0200 (CEST)", "by mail-pl1-f180.google.com with SMTP id\n d9443c01a7336-1b02085bf8dso4389695ad.0\n for <dev@dpdk.org>; Thu, 01 Jun 2023 08:01:30 -0700 (PDT)", "from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218])\n by smtp.gmail.com with ESMTPSA id\n ij9-20020a170902ab4900b001ac40488620sm3661955plb.92.2023.06.01.08.01.28\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 01 Jun 2023 08:01:29 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685631689;\n x=1688223689;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=aKTYFTgDMobt85QN4hlYLhT1Yx+YASoq64PqApvDBiA=;\n b=tSzF9F52qfiFPzX73AU1s18GfioJE+wDhPoVBB9OtYu/jbUjPA13jv/cX6pS8rUtqF\n 2425TZdp/Q+u6/ovtjeMJ7o/vnZ42wUVDhduUAU49WFzdjiLbId6jkvqB8CwME3k4B0i\n ri7gzrERshPaqvzX8nFKUryQg9GTn+svR8anS2S1+xYJXq9DKn9N+KnFTfa6xle2o160\n pFFnFay1VpyBi0zOf4JClSbIv8YLLfPAK1tCnMd+Fns/KYDDdpddWF2fOB6YlGmO9Z4w\n R0YQSFT04ZTuWVPD8ikEucetmzIdjWNlLSm96RCOnKVWFo1ACe5j7Jz1KwuU/wSh1vQ4\n HCBA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20221208; t=1685631689; x=1688223689;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=aKTYFTgDMobt85QN4hlYLhT1Yx+YASoq64PqApvDBiA=;\n b=QM8qvWlvp2ujZMkGQ+xtkfD6/YNor0nkBnix6DIaTA4VO2n0HDMmm1ra3ezLzzkyID\n gYgG+SlxB7mtJAVrdq3gzjWg3k4frT+1MuWAyJJql7uMbdo21P/vOqEWRAFntjPYWl4v\n 5DAHYazKQnFJAaeTp8rf/2uGBOtYUZ9JwXVyPjHtBsfdpU9Q2yc9YtuLx09TYYpw/zhb\n /Ll0mgAv8FA8XiPUlCBvwEavcJQ17/kwse9O/+c+jlFc9bIOg4wCDUyU/htW+Hg1uKQH\n 99iamCqt9ULKamCWqC8aQAtWG3vLXJjOIn3+AVjDvnbJSJbpw6WXF0Ty1ffWpO55FkYZ\n OzHg==", "X-Gm-Message-State": "AC+VfDy+Ixfh3h1PeKiAN3gMQM12gQo8IgixWcBtux3ab0UhCvUAtMYP\n K9VNNhl4u7Co/5vYN6eTnGfyyTJKeiUHIUIjx4Ww0g==", "X-Google-Smtp-Source": "\n ACHHUZ7ZFkpyc8ihJwAxkpOGxy4xZ6AkikPz501bVmTytQVLuW1i9KhgozVqclkQHLkRVVwPz3M4VQ==", "X-Received": "by 2002:a17:902:e789:b0:1af:bcf7:2bd8 with SMTP id\n cp9-20020a170902e78900b001afbcf72bd8mr4723241plb.52.1685631689568;\n Thu, 01 Jun 2023 08:01:29 -0700 (PDT)", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "dev@dpdk.org", "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>", "Subject": "[PATCH 15/25] net/cxgbe: replace snprintf with strlcpy", "Date": "Thu, 1 Jun 2023 08:00:56 -0700", "Message-Id": "<20230601150106.18375-16-stephen@networkplumber.org>", "X-Mailer": "git-send-email 2.39.2", "In-Reply-To": "<20230601150106.18375-1-stephen@networkplumber.org>", "References": "<20230601150106.18375-1-stephen@networkplumber.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "Suggested by devtools/cocci/strlcpy-with-header.cocci\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n drivers/net/cxgbe/cxgbe_ethdev.c | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c\nindex 45bbeaef0ceb..a00fa6051344 100644\n--- a/drivers/net/cxgbe/cxgbe_ethdev.c\n+++ b/drivers/net/cxgbe/cxgbe_ethdev.c\n@@ -928,9 +928,8 @@ static int cxgbe_dev_xstats(struct rte_eth_dev *dev,\n \tcount = 0;\n \tfor (i = 0; i < nstats; i++, count++) {\n \t\tif (xstats_names != NULL)\n-\t\t\tsnprintf(xstats_names[count].name,\n-\t\t\t\t sizeof(xstats_names[count].name),\n-\t\t\t\t \"%s\", xstats_str[i].name);\n+\t\t\tstrlcpy(xstats_names[count].name, xstats_str[i].name,\n+\t\t\t\tsizeof(xstats_names[count].name));\n \t\tif (xstats != NULL) {\n \t\t\tstats_ptr = RTE_PTR_ADD(&ps,\n \t\t\t\t\t\txstats_str[i].offset);\n@@ -1043,8 +1042,8 @@ int cxgbe_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,\n \t\t\tret = -EINVAL;\n \t\t\tgoto out_err;\n \t\t}\n-\t\trte_strlcpy(xnames[i].name, xnames_copy[ids[i]].name,\n-\t\t\t sizeof(xnames[i].name));\n+\t\tstrlcpy(xnames[i].name, xnames_copy[ids[i]].name,\n+\t\t\tsizeof(xnames[i].name));\n \t}\n \n \tret = n;\n", "prefixes": [ "15/25" ] }{ "id": 127855, "url": "