Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2226733/?format=api
{ "id": 2226733, "url": "http://patchwork.ozlabs.org/api/patches/2226733/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/7ad3070944954bca1b727e8d2423805d9bbd3533.1776882798.git.alx@kernel.org/", "project": { "id": 41, "url": "http://patchwork.ozlabs.org/api/projects/41/?format=api", "name": "GNU C Library", "link_name": "glibc", "list_id": "libc-alpha.sourceware.org", "list_email": "libc-alpha@sourceware.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<7ad3070944954bca1b727e8d2423805d9bbd3533.1776882798.git.alx@kernel.org>", "list_archive_url": null, "date": "2026-04-22T18:38:00", "name": "[2/3] manual/: Prefer aprintf(3) over asprintf(3)", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "c3eee1b7727f6fbb1e69df3190bd1089534e953a", "submitter": { "id": 86795, "url": "http://patchwork.ozlabs.org/api/people/86795/?format=api", "name": "Alejandro Colomar", "email": "alx@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/7ad3070944954bca1b727e8d2423805d9bbd3533.1776882798.git.alx@kernel.org/mbox/", "series": [ { "id": 501084, "url": "http://patchwork.ozlabs.org/api/series/501084/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=501084", "date": "2026-04-22T18:37:55", "name": "Add [v]aprintf(3)", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501084/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2226733/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2226733/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "libc-alpha@sourceware.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "libc-alpha@sourceware.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=DL0YETGD;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=DL0YETGD", "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=kernel.org", "sourceware.org; spf=pass smtp.mailfrom=kernel.org", "server2.sourceware.org;\n arc=none smtp.remote-ip=172.234.252.31" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g17l919Rcz1yGs\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 04:57:41 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 29687453E3F5\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 18:57:39 +0000 (GMT)", "from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31])\n by sourceware.org (Postfix) with ESMTPS id 8D6F742ACFCF\n for <libc-alpha@sourceware.org>; Wed, 22 Apr 2026 18:38:04 +0000 (GMT)", "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n by sea.source.kernel.org (Postfix) with ESMTP id E73CA440E2;\n Wed, 22 Apr 2026 18:38:03 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id C162DC19425;\n Wed, 22 Apr 2026 18:38:01 +0000 (UTC)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 29687453E3F5", "OpenDKIM Filter v2.11.0 sourceware.org 8D6F742ACFCF" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 8D6F742ACFCF", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 8D6F742ACFCF", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776883084; cv=none;\n b=q8kob9hykcghadrb89RE8Asf9zzKIq+KyF/hHv8u82ZEmhstXN6MGN/xwcFUBEj2qCMYB3rjuJ/LKO9h2aDaczYePWGairm5Ri0o6A6fM5LNZG71/yMveZIErhXR/EG3TXrEfqmEXUWUqVHgMPVZgslR05AYM3HQn6WBSUEtxj8=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776883084; c=relaxed/simple;\n bh=EZ/H9xyt77P5+NsOB/rSSC6qIH3qGLiuF1/Fy0HdrPs=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=dzY6lR/o5AY4Tkipy/LjeVrBHvc99kfcyqVuxay0ZdsbwMZ0463SYNMIiroSBzhzY8csxlmpAaymOikru+/VmgVYZ0ZPwcAxYiWYok3s1OzVE9WD11q0L7fwQpxc781XCeqFAIqs+dnWbkmndAnW2qmSAGWey2P0tbJ6GRn1HPY=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1776883083;\n bh=EZ/H9xyt77P5+NsOB/rSSC6qIH3qGLiuF1/Fy0HdrPs=;\n h=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n b=DL0YETGD/nR1wMw5NxsyJTjj8OOYtkW9iA2TiFbl6p9cqS5tQ3+KDxYyMXwfImP8I\n tSOO1vtfT8Ne4ifQoBgZE9Ym57OwizJsAbXH326ufI6vjzwC8WXarwX7FjXDEiwZzH\n r6sCXYBV4L+i3W43HxswZB66WOgHI9FuS2nnAN1ghxHe5wijb8w/Dwrty/QyI+4InM\n xWbmNOsJT6IQGdyRvnW5uBmiyokxqRiv5MmWYiLEtjhRFMO75lafhZHCZX4c6b739b\n yOlbhSSKLg1CJ9fY4+qi5LZnlTZjU8Fq8WmnrBB1WHyhOtO7qkc2PZhk0IK1Ilsegz\n pKNTb5D3hu3aw==", "Date": "Wed, 22 Apr 2026 20:38:00 +0200", "From": "Alejandro Colomar <alx@kernel.org>", "To": "libc-alpha@sourceware.org", "Cc": "Alejandro Colomar <alx@kernel.org>, Joseph Myers <josmyers@redhat.com>,\n Paul Eggert <eggert@cs.ucla.edu>,\n Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,\n Florian Weimer <fweimer@redhat.com>, \"Dmitry V. Levin\" <ldv@altlinux.org>,\n Archie Cobbs <archie.cobbs@gmail.com>, Solar Designer <solar@openwall.com>,\n Sam James <sam@gentoo.org>", "Subject": "[PATCH 2/3] manual/: Prefer aprintf(3) over asprintf(3)", "Message-ID": "\n <7ad3070944954bca1b727e8d2423805d9bbd3533.1776882798.git.alx@kernel.org>", "X-Mailer": "git-send-email 2.53.0", "References": "<abSVWeS3nHmkZSKn@devuan>\n <cover.1776882798.git.alx@kernel.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=utf-8", "Content-Disposition": "inline", "In-Reply-To": "<cover.1776882798.git.alx@kernel.org>", "X-BeenThere": "libc-alpha@sourceware.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Libc-alpha mailing list <libc-alpha.sourceware.org>", "List-Unsubscribe": "<https://sourceware.org/mailman/options/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe>", "List-Archive": "<https://sourceware.org/pipermail/libc-alpha/>", "List-Post": "<mailto:libc-alpha@sourceware.org>", "List-Help": "<mailto:libc-alpha-request@sourceware.org?subject=help>", "List-Subscribe": "<https://sourceware.org/mailman/listinfo/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=subscribe>", "Errors-To": "libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org" }, "content": "While it's less portable at the moment, it's a better API (simpler,\nsafer, and less error-prone).\n\nThe C Committee has expressed strong support for this API, intending to\nstandardize it. Thus, it should be more portable in the long term.\n\nSigned-off-by: Alejandro Colomar <alx@kernel.org>\n---\n manual/examples/rprintf.c | 4 ++--\n manual/stdio.texi | 4 ++--\n manual/string.texi | 2 +-\n 3 files changed, 5 insertions(+), 5 deletions(-)", "diff": "diff --git a/manual/examples/rprintf.c b/manual/examples/rprintf.c\nindex 734a8768..736ac169 100644\n--- a/manual/examples/rprintf.c\n+++ b/manual/examples/rprintf.c\n@@ -38,8 +38,8 @@ print_widget (FILE *stream,\n \n /* Format the output into a string. */\n w = *((const Widget **) (args[0]));\n- len = asprintf (&buffer, \"<Widget %p: %s>\", w, w->name);\n- if (len == -1)\n+ buffer = aprintf (\"<Widget %p: %s>\", w, w->name);\n+ if (buffer == NULL)\n return -1;\n \n /* Pad to the minimum field width and print to the stream. */\ndiff --git a/manual/stdio.texi b/manual/stdio.texi\nindex e7deca78..91149626 100644\n--- a/manual/stdio.texi\n+++ b/manual/stdio.texi\n@@ -2458,7 +2458,7 @@ because it can potentially output more characters than can fit in the\n allocation size of the string @var{s}. Remember that the field width\n given in a conversion specification is only a @emph{minimum} value.\n \n-To avoid this problem, you can use @code{snprintf} or @code{asprintf},\n+To avoid this problem, you can use @code{snprintf} or @code{aprintf},\n described below.\n @end deftypefun\n \n@@ -2543,7 +2543,7 @@ make_message (char *name, char *value)\n @end group\n @end smallexample\n \n-In practice, it is often easier just to use @code{asprintf}, below.\n+In practice, it is often easier just to use @code{aprintf}, below.\n \n @strong{Attention:} In versions of @theglibc{} prior to 2.1 the\n return value is the number of characters stored, not including the\ndiff --git a/manual/string.texi b/manual/string.texi\nindex 24004f1f..7a6ee12a 100644\n--- a/manual/string.texi\n+++ b/manual/string.texi\n@@ -1198,7 +1198,7 @@ strings to fit arbitrary size limits. @xref{Semantics, , Writing\n Robust Programs, standards, The GNU Coding Standards}. Instead of\n string-truncation functions, it is usually better to use dynamic\n memory allocation (@pxref{Unconstrained Allocation}) and functions\n-such as @code{strdup} or @code{asprintf} to construct strings.\n+such as @code{strdup} or @code{aprintf} to construct strings.\n \n @node String/Array Comparison\n @section String/Array Comparison\n", "prefixes": [ "2/3" ] }