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=-13.8 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 256ADC433E2 for ; Fri, 4 Sep 2020 15:27:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EEC312074D for ; Fri, 4 Sep 2020 15:27:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SKhtBEOm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730892AbgIDP1X (ORCPT ); Fri, 4 Sep 2020 11:27:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730866AbgIDP1R (ORCPT ); Fri, 4 Sep 2020 11:27:17 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 064CDC061244 for ; Fri, 4 Sep 2020 08:27:17 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id e11so7754432wme.0 for ; Fri, 04 Sep 2020 08:27:16 -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=3RDW7eoBErUkIl1/wStm1LzG6qCZV6NRX2n3TabaTho=; b=SKhtBEOmqeuAgGGjRIUHY7LmrvWinDuyjTcnCIpFdg9lSt+lL8CkuASAUFM1fwsmyB JaYFkjJ16IsFg/s4akk23SzlJV/3EDJxOnJMHB8eQo3obhPMba0BndbeVZddpJKv4zI4 /IXBkOqqWHHJ7i3KZAn7DQpKblEqsKNeV8Ji1/KEY7wPYYOSoQ7bcIA1sJqD6fZY4YEm CUb/P1r2nw3xdl+STWWp5T+RxRg65zqCg83TJvspGMD8g8fkFdo8BsMfffwkmvxwFVEx KdUag8z2yXTK3oqAUHJd9Gh3obTkR6mAYY/QOoM38oABOed7GoKgasmvQzz/Sa7J1b4r KfVg== 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=3RDW7eoBErUkIl1/wStm1LzG6qCZV6NRX2n3TabaTho=; b=oPDveCgX36xKiQEilpSF/c3Q/ZbnhrIy2qZzSKVyLhbYTIsBcD3WGqXW7ZZsH9GXRr MvwEy3JcPVAP45bA/rhODbuJN0D4gCL4hs8/7t3mZ/bG1tDYIEPuOAgRMDj1zqqJRnfP hAbm0PghD0uBMiqYI/sMg8E4lW5h4nsvfFJf5l8f96KUFdhcl4Y+Zs5sSPWSy+uYAm6i JsUD42IC9JAU4AnwtmlyOB7dDFkatswpdcgPAPnwzwti2s0+O7H9ueSpic+Td7hQ+zY0 mOIdLhFGDg4+pQwKW88AxdQBs11LwJoqqLDVDswVYDWm2vTJXB3b4mrkB5+7kZu5b4NL cNSA== X-Gm-Message-State: AOAM5330cfpQEbQzk7ozgB9wrnAkw26n6PRX2K/ZdE3RZhBWnvVUay1Z iRrEgVHMOqcX7lKngOPKJ4M= X-Google-Smtp-Source: ABdhPJwScPSXvOiblIqQFVNAuOFJqtZNWf12T1rZHbDcyXrKmdYZSxJKCwCnngTRdgtIUvdL1u+cug== X-Received: by 2002:a7b:c775:: with SMTP id x21mr7881998wmk.47.1599233235755; Fri, 04 Sep 2020 08:27:15 -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 t1sm11023196wmi.16.2020.09.04.08.27.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Sep 2020 08:27:15 -0700 (PDT) Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org, Jakub Wilk Subject: Re: [PATCH (2) 19/34] malloc_info.3: Use sizeof consistently To: Alejandro Colomar References: <462b75ca-bef8-063d-b6ec-d1c845fb1580@gmail.com> <26629635-bf4c-1279-314d-db92f11adbb7@gmail.com> <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> From: "Michael Kerrisk (man-pages)" Message-ID: <98d066ba-e48f-070d-ad8f-601309299f81@gmail.com> Date: Fri, 4 Sep 2020 17:27:14 +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: <3c25bbda-bc90-1364-77cd-2c637f09d611@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:41 PM, Alejandro Colomar wrote: >>>From bf1a7799161fe1f08570c4f25d87a0f4e0b51ef1 Mon Sep 17 00:00:00 2001 > From: Alejandro Colomar > Date: Thu, 3 Sep 2020 21:49:17 +0200 > Subject: [PATCH 19/34] malloc_info.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 > > Signed-off-by: Alejandro Colomar Thanks. Patch applied. Cheers, Michael > --- > man3/malloc_info.3 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/man3/malloc_info.3 b/man3/malloc_info.3 > index 0d95cdff7..598478dcc 100644 > --- a/man3/malloc_info.3 > +++ b/man3/malloc_info.3 > @@ -226,7 +226,7 @@ main(int argc, char *argv[]) > blockSize = atoi(argv[3]); > sleepTime = (argc > 4) ? atoi(argv[4]) : 0; > > - thr = calloc(numThreads, sizeof(pthread_t)); > + thr = calloc(numThreads, sizeof(*thr)); > if (thr == NULL) > errExit("calloc"); > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/