get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 56663,
    "url": "https://patches.dpdk.org/api/patches/56663/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190718004822.25431-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": "<20190718004822.25431-4-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190718004822.25431-4-stephen@networkplumber.org",
    "date": "2019-07-18T00:48:22",
    "name": "[v2,3/3] cfgfile: use calloc",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "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": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190718004822.25431-4-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 5578,
            "url": "https://patches.dpdk.org/api/series/5578/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=5578",
            "date": "2019-07-18T00:48:19",
            "name": "cfgfile: cleanup patches",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/5578/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/56663/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/56663/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 062111B952;\n\tThu, 18 Jul 2019 02:48:37 +0200 (CEST)",
            "from mail-pg1-f195.google.com (mail-pg1-f195.google.com\n\t[209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 69CF13977\n\tfor <dev@dpdk.org>; Thu, 18 Jul 2019 02:48:32 +0200 (CEST)",
            "by mail-pg1-f195.google.com with SMTP id t132so11982441pgb.9\n\tfor <dev@dpdk.org>; Wed, 17 Jul 2019 17:48:32 -0700 (PDT)",
            "from xps13.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n\tby smtp.gmail.com with ESMTPSA id\n\t131sm30459808pfx.57.2019.07.17.17.48.29\n\t(version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);\n\tWed, 17 Jul 2019 17:48:30 -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=TK3sleuApVQSR7Ot12jPA+s4R6dJqU06F9dYryJScJVhImzomWX65f+2bDHyl7vr2x\n\tLnn1m24AB3E5qZ+PcXS13TtJj1jPVpcBipZDNnw6QK4YA1HyNuAo2sIVyGpO9i0F5Sig\n\t+VhTB29JpcXT5IrAIs07qI2bpYycm0dVj7ovvWJIE2m4Fpfz8wAET3DdZkA0Ic6rRSm8\n\t5fuZfrVFEBGHQLzpCFjV5V7HCG/FowzPsn26gEIoHxqVtQtYED1mIXLSSWp/n3dVHAIJ\n\t4TJANLT8ZxbH/IEkF3dwUaJsHWoyT49vo6mfLA5b1yzaffIEbbERyzUpEV61UTWcd+aA\n\tdQRg==",
        "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=ECd4nQFsYX1PZ8rlIvmR9COXTrD85xbUkdlkG5IjBn5oLcIfbKUr3G0Eq14KlWMZcv\n\tTlHg0yujzwJgruIPIHDS6BJAhJFhu3FQ6ArXJmnwHHQils9+w9AcPlL53gwMS5R733WK\n\th19QS0/LM80i0pmJkiKvW/7E6iQYIwsNkNpQjE3aRbLX3cwws5Y5/kAG3g6m528ak2bx\n\tHTKb1btFNrJyIjSAXeuiJjbUwYv7/qR/hkdxtzOqvMgz5G049/RXxvLKTqblVYLycljJ\n\tyzpfpibuEkYAT9IqQf2ofLEehiqgunLplVVvRbKMh4OHTeyZ37mK6+h5ByZcnIMuFPAI\n\tRd0A==",
        "X-Gm-Message-State": "APjAAAV4No2tc9C0g4bR5EPmqaBtPYw3hXNudZQxzn84/eWgxhlYsquF\n\tsRuGFpm9SHlAS1jmvUMoXW69vNIR",
        "X-Google-Smtp-Source": "APXvYqztvQuYQjB2TrTqIKeRPd+T05rH7ZCvT5/+KpmVDQLsHREMRRk6yW9HAfQ8ZWoz3C+UDAI8BA==",
        "X-Received": "by 2002:a63:61c6:: with SMTP id\n\tv189mr38348241pgb.36.1563410911304; \n\tWed, 17 Jul 2019 17:48:31 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "Date": "Wed, 17 Jul 2019 17:48:22 -0700",
        "Message-Id": "<20190718004822.25431-4-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190718004822.25431-1-stephen@networkplumber.org>",
        "References": "<20190716172741.21399-1-stephen@networkplumber.org>\n\t<20190718004822.25431-1-stephen@networkplumber.org>",
        "Subject": "[dpdk-dev] [PATCH v2 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": [
        "v2",
        "3/3"
    ]
}