From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE29CC433E2 for ; Sat, 5 Sep 2020 14:21:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 62611206A5 for ; Sat, 5 Sep 2020 14:21:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ua1tjouL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728264AbgIEOVy (ORCPT ); Sat, 5 Sep 2020 10:21:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727875AbgIEOVy (ORCPT ); Sat, 5 Sep 2020 10:21:54 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97C4DC061244 for ; Sat, 5 Sep 2020 07:21:53 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id c15so10185545wrs.11 for ; Sat, 05 Sep 2020 07:21:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=cc:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0tl2jLM8OMxox+GcryR4VV4ZJ0DlfjyguOxoJIQ/ghk=; b=Ua1tjouL70t+r91m3/dGOS8dm8okBg8STv67C0qVcYSkeZWPowlZuDYR4zq2L6CbP2 Co8WU7yPTbGjUbOa8Nj2zt8KA98mk5OUYC7mqBlqyMPVOc4hwpxPRKyouIo1xMzAkivh F8Po6k5+gWnHgLzT6jP2zP5Z1wS7a42BFe+KXWyHbwu5X1o66ch1n/SBurrVvDAlH19L Uj2vy5MiXaTio4xbhxYkjDcPoJ3+YXwBRYUbq1dW/RozpU8nShKR79fcYrk8aFHROsQ+ rPzBGbRo1WQRD5UCsf65jY1/GMOK7gfctk4sQHd7WuqLuI/xb5tzt4bbO11YuceiiKd9 +Q3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:cc:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0tl2jLM8OMxox+GcryR4VV4ZJ0DlfjyguOxoJIQ/ghk=; b=RmqueWxbXanyjB6PwIDJI7IzKNbr2BmwoBnVgwCu7udK00xg86/5I6CCrMGmOAubdg UDHSt4dTq5HA7DV1DSUvEkZ8LbPhiMhS0NrB6ioCVGTzSl50ZZIdAvvdYG/VjxfJ+EcT XBPv3zYirF0WT2nzepcjDX4Cgvn9w/YRF9cbKbcF2lYA0liR+s1k7nVZ6wX4qlGchbPz D+tRFla/bIXSjlJZZZrJcrRIGnGTXxCgTvIQYXrhHOO+qUolK5JfP5CaNwvJqX2aaPaf IGxIBbxy6h9e4kgIUdj2p1hG8vpiDLVqzCX7lJmIk2BCWmVaugRnyDqDET3Qt/SLdhkp ORSw== X-Gm-Message-State: AOAM533uj5YqIAp2oPck1fNkh/oYOiAFJVEN/TdADp7dxu891M+eL68w wi+7UmBZWxfUDF952y8V2bytieXwKeM= X-Google-Smtp-Source: ABdhPJxyckYZltBR96JesBQ1CTVYssch2V++oKV/styLJ1MWMgXWseEayY5hMTQ2iYrv2L4M0guYvA== X-Received: by 2002:adf:ef0a:: with SMTP id e10mr12502322wro.362.1599315712264; Sat, 05 Sep 2020 07:21:52 -0700 (PDT) Received: from ?IPv6:2001:a61:3ab0:7001:e081:d401:3da8:e4bc? ([2001:a61:3ab0:7001:e081:d401:3da8:e4bc]) by smtp.gmail.com with ESMTPSA id m13sm17783606wrr.74.2020.09.05.07.21.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 05 Sep 2020 07:21:51 -0700 (PDT) Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org, Jakub Wilk Subject: Re: [PATCH (2) 22/34] pthread_create.3: Use sizeof consistently To: Alejandro Colomar References: <257c9374-3253-9091-c116-045ee16590c0@gmail.com> <40ba6e68-c2f6-649c-2225-6037e3c0c077@gmail.com> <8458b842-7d4b-f19b-c596-7f529dd48ba6@gmail.com> <497bc4f4-31f5-91a5-8bc4-469e22b26502@gmail.com> <8160510c-4d9e-7f30-e810-648b0b58a986@gmail.com> <87d5b09a-a3c8-622c-d731-5d42644a5f24@gmail.com> <61d2f2f9-08d0-9f1a-9642-ae56b3f4b61d@gmail.com> <4bb9e639-83ee-ede0-f6ad-dfc16787d358@gmail.com> <3c25bbda-bc90-1364-77cd-2c637f09d611@gmail.com> <4f0ff40c-2a63-736d-698f-0efc436c3678@gmail.com> <5343bbd1-b03f-29bf-2def-c27ba3a3616e@gmail.com> From: "Michael Kerrisk (man-pages)" Message-ID: Date: Sat, 5 Sep 2020 16:21:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <5343bbd1-b03f-29bf-2def-c27ba3a3616e@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-man-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-man@vger.kernel.org Hello Alex, On 9/4/20 4:48 PM, Alejandro Colomar wrote: >>>From 03783d811fad4783b394c01a4ac68ca6d92b6c58 Mon Sep 17 00:00:00 2001 > From: Alejandro Colomar > Date: Thu, 3 Sep 2020 21:52:22 +0200 > Subject: [PATCH 22/34] pthread_create.3: Use sizeof consistently > > Use ``sizeof`` consistently through all the examples in the following > way: > > - Use the name of the variable instead of its type as argument for > ``sizeof``. > > Rationale: > https://www.kernel.org/doc/html/v5.8/process/coding-style.html#allocating-memory Patch applied. Cheers, Michael > Signed-off-by: Alejandro Colomar > --- > man3/pthread_create.3 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/man3/pthread_create.3 b/man3/pthread_create.3 > index d86188e6b..5ffb14586 100644 > --- a/man3/pthread_create.3 > +++ b/man3/pthread_create.3 > @@ -361,7 +361,7 @@ main(int argc, char *argv[]) > > /* Allocate memory for pthread_create() arguments */ > > - tinfo = calloc(num_threads, sizeof(struct thread_info)); > + tinfo = calloc(num_threads, sizeof(*tinfo)); > if (tinfo == NULL) > handle_error("calloc"); > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/