Patch Detail
Show a patch.
GET /api/patches/1674/?format=api
{ "id": 1674, "url": "https://patchwork.libcamera.org/api/patches/1674/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1674/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20190712194207.2806-1-niklas.soderlund@ragnatech.se>", "date": "2019-07-12T19:42:07", "name": "[libcamera-devel] libcamera: ipa_module: Fix open source licence verification", "commit_ref": "8f1dbd6a92381e38ba4bf65bdc35d5475ae6dc0a", "pull_url": null, "state": "accepted", "archived": false, "hash": "fcec6c4257ec87711563bfe554bd463f698b2f0a", "submitter": { "id": 5, "url": "https://patchwork.libcamera.org/api/people/5/?format=api", "name": "Niklas Söderlund", "email": "niklas.soderlund@ragnatech.se" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/1674/mbox/", "series": [ { "id": 426, "url": "https://patchwork.libcamera.org/api/series/426/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=426", "date": "2019-07-12T19:42:07", "name": "[libcamera-devel] libcamera: ipa_module: Fix open source licence verification", "version": 1, "mbox": "https://patchwork.libcamera.org/series/426/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1674/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1674/checks/", "tags": {}, "headers": { "Return-Path": "<niklas.soderlund@ragnatech.se>", "Received": [ "from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net\n\t[195.74.38.229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1972160C23\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Jul 2019 21:42:22 +0200 (CEST)", "from localhost.localdomain (unknown [126.209.254.147])\n\tby bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA\n\tid 240f644d-a4dd-11e9-8d05-005056917f90;\n\tFri, 12 Jul 2019 21:42:17 +0200 (CEST)" ], "X-Halon-ID": "240f644d-a4dd-11e9-8d05-005056917f90", "Authorized-sender": "niklas@soderlund.pp.se", "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sat, 13 Jul 2019 04:42:07 +0900", "Message-Id": "<20190712194207.2806-1-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.22.0", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] libcamera: ipa_module: Fix open source\n\tlicence verification", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.23", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "X-List-Received-Date": "Fri, 12 Jul 2019 19:42:22 -0000" }, "content": "The second argument to std::array is the size of the array, not of the\nelements it contains. Fix this by turning the std::array into a simple\narray of const char pointers.\n\nFixes: 099815b85377ac68 (\"libcamera: ipa_module: add isOpenSource\")\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/libcamera/ipa_module.cpp | 10 +++++++---\n 1 file changed, 7 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\nindex 93bb4889023bb433..f9e0896cb84eab0d 100644\n--- a/src/libcamera/ipa_module.cpp\n+++ b/src/libcamera/ipa_module.cpp\n@@ -22,6 +22,7 @@\n \n #include \"log.h\"\n #include \"pipeline_handler.h\"\n+#include \"utils.h\"\n \n /**\n * \\file ipa_module.h\n@@ -478,7 +479,7 @@ bool IPAModule::match(PipelineHandler *pipe,\n */\n bool IPAModule::isOpenSource() const\n {\n-\tstatic std::array<const char *, sizeof(char *)> osLicenses = {\n+\tstatic const char *osLicenses[] = {\n \t\t\"GPL-2.0-only\",\n \t\t\"GPL-2.0-or-later\",\n \t\t\"GPL-3.0-only\",\n@@ -489,8 +490,11 @@ bool IPAModule::isOpenSource() const\n \t\t\"LGPL-3.0-or-later\",\n \t};\n \n-\treturn std::find(osLicenses.begin(), osLicenses.end(), info_.license)\n-\t != osLicenses.end();\n+\tfor (unsigned int i = 0; i < ARRAY_SIZE(osLicenses); i++)\n+\t\tif (!strcmp(osLicenses[i], info_.license))\n+\t\t\treturn true;\n+\n+\treturn false;\n }\n \n } /* namespace libcamera */\n", "prefixes": [ "libcamera-devel" ] }