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 8C591C2D0A8 for ; Fri, 4 Sep 2020 15:26:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 522E72074D for ; Fri, 4 Sep 2020 15:26:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="vAfSxdGa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730224AbgIDP0Q (ORCPT ); Fri, 4 Sep 2020 11:26:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730916AbgIDPZ6 (ORCPT ); Fri, 4 Sep 2020 11:25:58 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9893C061244 for ; Fri, 4 Sep 2020 08:25:56 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id l9so6454945wme.3 for ; Fri, 04 Sep 2020 08:25:56 -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=6oaznl39I3elP6UEdIUau5Q3oR14FMDnhJgknVh/lVs=; b=vAfSxdGaEhCT/PvclPksQDeNTdwhABtMQ1EFJvuIxzR4otzyFprMs174cquADXOvpb bAuEnElSWAGqWf6xYK4uB6IsBX2R1qJ6eDYjYOXOdI0dZTOIdtJHHlOYoRMIvMuwxlKc UbLMP2jMcwLqP0rSu9ly3A5a2P6vEvsY2MxQoOmGGen5yOsR5HfEfSnJ9PigK39/yVYM Z7m268m0Sui68nmrAlWWSheY8MXRNx8EQgB50r/Zqi5587QnDcb2RUu7VUpj7EkvCkjV Z19FO1N1/Q51YLzBQMVTJP4E16zmCKPHATjiQCOHR4JLldwTFJD462GvELhVcpxUpPd9 wSaw== 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=6oaznl39I3elP6UEdIUau5Q3oR14FMDnhJgknVh/lVs=; b=CnL4WYfh3oyK7V922K2M+QJmOsbJMB/6y7ouFNWAVvLLQuNpbD2KDqMlwFivPywgMp 38QGJA5d41CGujS4YtFWxApZpf6ZNJ4BL0FDVmPbVld+T8zTIolFpFK6h5kGU1aXxtxi pgKEJW7wW33cRHaomIyL9TV1Yyn3sjpxGsqvPkzrQhc+BzFCiqSi1NYBHRDCcuhPu+Dy 73aIB75U0JON+jB5tYbDphiFFqZUBu5xdd9vjfnM4GTxpjZ/VXTCoAZM7Q73g9bkRLtK +WY3ZFHRYcKYjt4iSx1meKOGUNkqnct+NoR9QQFHjpexGr3UOzaPBZHlL0HDtCMxEuyY LauQ== X-Gm-Message-State: AOAM532K41pE2bwzoq68HEi97FyG4GbMI+HZTlahcr9EqSlcK6AXWWoj 0i8rCWDBMXUFCqy9OXGetmhJbqsA8CQ= X-Google-Smtp-Source: ABdhPJw3vzTki+Fa1uZD0P9QcXGRiN/udnBQ2VBbbyYOgxdMyF2sbNWO4PaufkJ3gvJIgc9nElCpcw== X-Received: by 2002:a1c:9910:: with SMTP id b16mr8550102wme.79.1599233155650; Fri, 04 Sep 2020 08:25:55 -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 n17sm9505529wrw.0.2020.09.04.08.25.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Sep 2020 08:25:55 -0700 (PDT) Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org, Jakub Wilk Subject: Re: [PATCH (2) 18/34] insque.3: Use sizeof consistently To: Alejandro Colomar References: <876dcc97-8151-7160-5eda-19307f0483c1@gmail.com> <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> From: "Michael Kerrisk (man-pages)" Message-ID: <10641db4-90ec-1c69-88fa-ce2b48330f53@gmail.com> Date: Fri, 4 Sep 2020 17:25:54 +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: <4bb9e639-83ee-ede0-f6ad-dfc16787d358@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:37 PM, Alejandro Colomar wrote: >>>From b43c812d1e129a8d2b34df7624a78baa3bf1273e Mon Sep 17 00:00:00 2001 > From: Alejandro Colomar > Date: Thu, 3 Sep 2020 21:47:45 +0200 > Subject: [PATCH 18/34] insque.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/insque.3 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/man3/insque.3 b/man3/insque.3 > index a9fc28550..005ad8cc1 100644 > --- a/man3/insque.3 > +++ b/man3/insque.3 > @@ -182,7 +182,7 @@ new_element(void) > { > struct element *e; > > - e = malloc(sizeof(struct element)); > + e = malloc(sizeof(*e)); > if (e == NULL) { > fprintf(stderr, "malloc() failed\en"); > exit(EXIT_FAILURE); > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/