get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/56736/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 56736,
    "url": "https://patches.dpdk.org/api/patches/56736/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190718171812.3209-4-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": "<20190718171812.3209-4-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190718171812.3209-4-stephen@networkplumber.org",
    "date": "2019-07-18T17:18:12",
    "name": "[v3,3/3] cfgfile: use calloc",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "9eacc039f692c37e334d8eb8040fb89970931f33",
    "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/20190718171812.3209-4-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 5601,
            "url": "https://patches.dpdk.org/api/series/5601/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=5601",
            "date": "2019-07-18T17:18:09",
            "name": "cfgfile: cleanup patches",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/5601/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/56736/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/56736/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 EBFF9532C;\n\tThu, 18 Jul 2019 19:18:28 +0200 (CEST)",
            "from mail-pg1-f193.google.com (mail-pg1-f193.google.com\n\t[209.85.215.193]) by dpdk.org (Postfix) with ESMTP id 2A8C03977\n\tfor <dev@dpdk.org>; Thu, 18 Jul 2019 19:18:22 +0200 (CEST)",
            "by mail-pg1-f193.google.com with SMTP id i70so2444597pgd.4\n\tfor <dev@dpdk.org>; Thu, 18 Jul 2019 10:18:21 -0700 (PDT)",
            "from localhost.localdomain ([67.23.203.6])\n\tby smtp.gmail.com with ESMTPSA id\n\t137sm36038021pfz.112.2019.07.18.10.18.17\n\t(version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);\n\tThu, 18 Jul 2019 10:18:18 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=N1WVl4UQRTpsyytnCtNAVwaiTrTPmL/dbLCjaW6bKtI=;\n\tb=07rsIpMvaw3Jf7ySy6COdZlMLbrjnBvxVG2ARZ/bvTy55xAhnCpzRC3/2mndptV+Ol\n\tgGiqnAD9pTsSoToeAoHR6tH8OCAWyE5+6p3DW3YIIxXLJPRdQrXyKTr/Dq6xvJ7xe747\n\t7VuKcPVTwGPXCPqZkgzvP+SmsIg00uxXzkf2HkLETI4DHicoGGPLvxQBto/ZS6xFgNa0\n\tmoiYujchoKZ2q9mOk+vfN7N3xjAkgBOBB5i6TanHDL/6Umpt92VtcrVXhdmH/8ec4NaN\n\ttPnLHFLqBuRgBTcTeGEy5XuwT7xvnZX7VpTFbnRwh3YrpJ6iLK7ZQj83gLhz9omf8f3i\n\tBbvA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=N1WVl4UQRTpsyytnCtNAVwaiTrTPmL/dbLCjaW6bKtI=;\n\tb=itTc0MdzL2n0WigYjQazS3GblBfoK7q/Wu0GWrynGtMNZbBGKc1CWsBquwS4gJnaqa\n\tsUF5CZt+uCAOeFQ7eFCUnb+0CpmiJ6yF5tZUHMgxPnbjDi4bpaC8NueehDkStwqk2CJu\n\tafIDw7j02pVUUFHE4CJPzPosa787uJ5HzMWXvk8PS7Jo91hmbD6Jjp+sagPVCxy+O5Av\n\t/zuAyhvkP6GTlv0hTfOJxgT1AiXk7w+pVqJ2JxUJlM/OeuF6MJLAhZeQrqiVUuhEH/dJ\n\tK1b6V3yv7jlI/Sb6pOtCniqQxB3VdhLf5vWFzjRcI67ho37w0WIlA4a1Z8ntn+fEE3y5\n\t9rZQ==",
        "X-Gm-Message-State": "APjAAAV/ptOfAxOmcNfGIaqpnKDHy269XdCHMZ5n2pQzbpOdHxpYGGoE\n\tX9TS/gRsHOEQRxX7DsVmHvY9QX/Q",
        "X-Google-Smtp-Source": "APXvYqxmOnhGIqcbfke3PAx8nBV5sXFxjIuqRNB2GRcLY+hTQWgPJNfMPST+fncIQf9X8wUGgyhguA==",
        "X-Received": "by 2002:a17:90a:cb81:: with SMTP id\n\ta1mr50872227pju.81.1563470301011; \n\tThu, 18 Jul 2019 10:18:21 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "Date": "Thu, 18 Jul 2019 10:18:12 -0700",
        "Message-Id": "<20190718171812.3209-4-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190718171812.3209-1-stephen@networkplumber.org>",
        "References": "<20190716172741.21399-1-stephen@networkplumber.org>\n\t<20190718171812.3209-1-stephen@networkplumber.org>",
        "Subject": "[dpdk-dev] [PATCH v3 3/3] cfgfile: use calloc",
        "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": "Better to use calloc when allocating arrays.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/librte_cfgfile/rte_cfgfile.c | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib/librte_cfgfile/rte_cfgfile.c\nindex 388415147930..9049fd9c2319 100644\n--- a/lib/librte_cfgfile/rte_cfgfile.c\n+++ b/lib/librte_cfgfile/rte_cfgfile.c\n@@ -281,17 +281,16 @@ rte_cfgfile_create(int flags)\n \tcfg->num_sections = 0;\n \n \t/* allocate first batch of sections and entries */\n-\tcfg->sections = malloc(sizeof(struct rte_cfgfile_section) *\n-\t\t\tCFG_ALLOC_SECTION_BATCH);\n-\n+\tcfg->sections = calloc(CFG_ALLOC_SECTION_BATCH,\n+\t\t\t       sizeof(struct rte_cfgfile_section));\n \tif (cfg->sections == NULL)\n \t\tgoto error1;\n \n \tcfg->allocated_sections = CFG_ALLOC_SECTION_BATCH;\n \n \tfor (i = 0; i < CFG_ALLOC_SECTION_BATCH; i++) {\n-\t\tcfg->sections[i].entries = malloc(sizeof(\n-\t\t\tstruct rte_cfgfile_entry) * CFG_ALLOC_ENTRY_BATCH);\n+\t\tcfg->sections[i].entries = calloc(CFG_ALLOC_ENTRY_BATCH,\n+\t\t\t\t\t  sizeof(struct rte_cfgfile_entry));\n \n \t\tif (cfg->sections[i].entries == NULL)\n \t\t\tgoto error1;\n",
    "prefixes": [
        "v3",
        "3/3"
    ]
}