Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1395344pxk; Thu, 10 Sep 2020 14:20:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpRZocz8aoRaXbyPG1M3gTuGUYrlVPNL4mujzE9Tff2QKKuaIl7C3OBZodR8egGJRAErTE X-Received: by 2002:a17:906:6007:: with SMTP id o7mr11441560ejj.550.1599772802358; Thu, 10 Sep 2020 14:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599772802; cv=none; d=google.com; s=arc-20160816; b=OydbqaQ2q+bH+dMLxdK7scVg4/oFSuWRp+28fttWToEtpVQIldzkbbtI6JHl7sMVUz RkyT8JoiSWgvn+dfTFowOko4DroQ63B0M6gT0IDXIybqgXLd/pVsYGy5dZR4fLzQc96L GaMwONW89RViQnbh7rcIcqva+z1ee90NTcMFniR3IQQ0UoXP40v3KQ1pJXuVQdGgUhP3 syGLV99zZK7pqsgkkJxREycmUkjZsKtoPlx7/8nz0eQSqEGy1tjOrCaojhYdGaNOQJcq DhUZR7nSGLvCvJyuSLk9she9KKQc16V5/tuu3ydJ7YuW7RW34/fdXWfpA2tfhn/8lh+/ JUOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vzrGVrRL8cPFnEaLd6Z9+xAt3xUa09Ej8wf0gXFfgvo=; b=Plo0t4YmczAByzgdI3Ty/ic+z1LOVTstoaWFb3bRkixxQvrtdbMumX1jtcvm9AtCTu SIrQpSr/55BxaQ7pwOwMmLzUuabRR6vj6m+D+XE//2ujGtjI6vhHSNTO5P6dbSHhn0Je IaAPkpMpm353RI9vh7znyYbqjIw9/X/P7adN8O95HkWVXmVli55HP9nxdSLVcMNeVAqy ea7KZuBs3PEk2qombrnqZF/ckR90IP33H4Ycs8NBw2t+IxquLH97ZQvDnBqUAq81E3rE Vb6pKeFJe24L9YmgpwotSBpmicrhCMgm1Ud+s6fjg0BHL9Y+bpjkRckqduFxnjpN6BwL QTBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="R/N/MFtL"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u12si4386130edy.390.2020.09.10.14.19.39; Thu, 10 Sep 2020 14:20:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="R/N/MFtL"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726810AbgIJVRI (ORCPT + 99 others); Thu, 10 Sep 2020 17:17:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728035AbgIJVOr (ORCPT ); Thu, 10 Sep 2020 17:14:47 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85B67C0617A0; Thu, 10 Sep 2020 14:14:25 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id y15so2108433wmi.0; Thu, 10 Sep 2020 14:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vzrGVrRL8cPFnEaLd6Z9+xAt3xUa09Ej8wf0gXFfgvo=; b=R/N/MFtLtRB40jFJNMf/l5xHFm4vAOULXq5k+u01FvaAySurNetF8+R8h48oZ+JLC2 mbDVbLS8lL+1DTVHCJZm82lqJeCDYsRZeDANnXBADGudM2e/yyObduQTPyDiDZnEwXay OFcirsRlMfe3/YcdhUosFrinTXUAc5R3pdvDJEGZpR1kazVur9l2RHIlFZJdjBNH+Uwk 8/Ed/MLQRSjKybS2XgdIKIZiNzut2TUGovnqDCsHZg2VwKINWeca7ZYKMlue/cPyB1aB DnVJGhsROqmOc6RZp7abfAWZVDcZ+VbV2jd+elrENHNlGmQWLun62huqaNv+JL98/IpN 6nYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vzrGVrRL8cPFnEaLd6Z9+xAt3xUa09Ej8wf0gXFfgvo=; b=R7SDHAHdZ/Od9c0Ywta/Lg6WEN2F+D8cfnjcxbYmwaj/AlFuLMEV35mq3vukj7O2/m /YwI7CDnZw/1XjGZWj6kPi3xjKWV8oVR6RnY1bVYALqGdm7WkZekcPICtHZ+ZmAnYUhR r/Q0GunFaubSqKAbm329tvItrdn392wezQSDiOvTpjUU7iUsuQSev93zeavrGv6agbI8 qXtJIdafTOr+sEtAtQwkreLH9ZcybQ8Tt/4BQVQ0hO/5PFZ6HcSUdSeevU5v5+uLaMJ3 8vpkvKOOlrfRrFz1rhz99YNtZgK8nKerfle4PLJNfRnIKzDIiTSfqySNh447cvhtqYop lnGQ== X-Gm-Message-State: AOAM533f9PZoZdg+l5DoJ4QfQctTd/TIEPIqFjKQ2y5cWvJoh3QPKOqm eDZXzQv9jLxpc59L00HEJ89DRT8b6cLcJQ== X-Received: by 2002:a1c:e256:: with SMTP id z83mr1982676wmg.33.1599772464290; Thu, 10 Sep 2020 14:14:24 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id l10sm111502wru.59.2020.09.10.14.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 14:14:23 -0700 (PDT) From: Alejandro Colomar To: mtk.manpages@gmail.com Cc: linux-man@vger.kernel.org, linux-kernel@vger.kernel.org, Alejandro Colomar Subject: [PATCH 13/24] getpwent_r.3: Use sizeof() to get buffer size (instead of hardcoding macro name) Date: Thu, 10 Sep 2020 23:13:34 +0200 Message-Id: <20200910211344.3562-14-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200910211344.3562-1-colomar.6.4.3@gmail.com> References: <20200910211344.3562-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Alejandro Colomar --- man3/getpwent_r.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man3/getpwent_r.3 b/man3/getpwent_r.3 index 64f27dbfb..0f7581091 100644 --- a/man3/getpwent_r.3 +++ b/man3/getpwent_r.3 @@ -190,7 +190,7 @@ main(void) setpwent(); while (1) { - i = getpwent_r(&pw, buf, BUFLEN, &pwp); + i = getpwent_r(&pw, buf, sizeof(buf), &pwp); if (i) break; printf("%s (%d)\etHOME %s\etSHELL %s\en", pwp\->pw_name, -- 2.28.0