From patchwork Sat Dec 23 14:37:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dmitry V. Levin" X-Patchwork-Id: 852649 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-88574-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="gW+fNtEZ"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3z3nzW5Yd5z9s4q for ; Sun, 24 Dec 2017 01:37:59 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=SQbt1HE1gM+iSjJCau5CfQnbGj8Nb 2mwV8+tzYlecBtlbXpX4eSRErpzd7VtbfOrxsGxLb+p0toIqU/IdtHE5uQN9sOvF Dw7/gmFhPITJ81w1RjmQOeZxw42EjbIeRu+0FTw8tFCt2FYUIcjNWpfDwbhrWkJq 4Z1/8sPC1YKHPg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=VY9yY5KSjK74axOAMh9DT7zJ5t0=; b=gW+ fNtEZoX1l3FGjtk9vy4cgdxKcxhsfXxa3OfhIS2YRjTOI6lIEDGXr53Vtu+kNJNQ Bw9L0FAWxEMf/QhFdUYJ0xrmNeN99Qc57L5V+jz2gaxCLELginThKSje+aRKVZNp brtMe827j59Y6Jv4rgPl08DCR/jD/deQEgfH3ib4= Received: (qmail 9577 invoked by alias); 23 Dec 2017 14:37:53 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 9556 invoked by uid 89); 23 Dec 2017 14:37:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: vmicros1.altlinux.org Date: Sat, 23 Dec 2017 17:37:48 +0300 From: "Dmitry V. Levin" To: libc-alpha@sourceware.org Subject: [PATCH COMMITTED] getrandom: fix comment [BZ #22347] Message-ID: <20171223143748.GA8091@altlinux.org> Mail-Followup-To: libc-alpha@sourceware.org MIME-Version: 1.0 Content-Disposition: inline * stdlib/getrandom.c (getrandom): Fix comment. * sysdeps/unix/sysv/linux/getrandom.c (getrandom): Likewise. --- ChangeLog | 6 ++++++ stdlib/getrandom.c | 4 ++-- sysdeps/unix/sysv/linux/getrandom.c | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4050ec4..b9c3010 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-12-23 Dmitry V. Levin + + [BZ #22347] + * stdlib/getrandom.c (getrandom): Fix comment. + * sysdeps/unix/sysv/linux/getrandom.c (getrandom): Likewise. + 2017-12-23 Aurelien Jarno [BZ #21161] diff --git a/stdlib/getrandom.c b/stdlib/getrandom.c index b2a83c2..268b0e4 100644 --- a/stdlib/getrandom.c +++ b/stdlib/getrandom.c @@ -19,8 +19,8 @@ #include #include -/* Write LENGTH bytes of randomness starting at BUFFER. Return the - number of bytes written, or -1 on error. */ +/* Write up to LENGTH bytes of randomness starting at BUFFER. + Return the number of bytes written, or -1 on error. */ ssize_t getrandom (void *buffer, size_t length, unsigned int flags) { diff --git a/sysdeps/unix/sysv/linux/getrandom.c b/sysdeps/unix/sysv/linux/getrandom.c index 25eb6ef..31b0e4e 100644 --- a/sysdeps/unix/sysv/linux/getrandom.c +++ b/sysdeps/unix/sysv/linux/getrandom.c @@ -22,8 +22,8 @@ #include #ifdef __NR_getrandom -/* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on - success and -1 on failure. */ +/* Write up to LENGTH bytes of randomness starting at BUFFER. + Return the number of bytes written, or -1 on error. */ ssize_t getrandom (void *buffer, size_t length, unsigned int flags) {