Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10941000ybi; Thu, 25 Jul 2019 07:23:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyR0umzrtkLBF1TDfVlFDTowRShGf5XS9td9JeM/3vUvRrpYkWGaWQ30iqgYzZ/1ME+/TBe X-Received: by 2002:a17:902:1aa:: with SMTP id b39mr43095434plb.333.1564064583037; Thu, 25 Jul 2019 07:23:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564064583; cv=none; d=google.com; s=arc-20160816; b=Fj+LR5Cn1BOB4AWT3IZQpRyZw9azuO6Xvd/RKFad+i11K3ClvMzS8HUqcqq10EI3vy jFsLZqXRFtnVZLosELPkzS0XR+ea5mFD7LqL9JL2o5ont2pa5ea8q+qWiCU5DwSfBZu2 ql61OVlwEHdAmoU63e1Ir5aZnsgUwdEC2zTSmnwdpAspsA+x/XAmbkLpn+X/cY5qJ6Rk lGmM9s7YOx2X/zh7LUl03nbRBp/iolUDgtRmi8/zU7NKNU8bpQGOtNwn5+ZixWXKXznv 8Irf6F2vExSLl9NPCcCatqxrbOmevgmhgmnn4J5Y9jBgKJ7GeiZw74oeVgLB5BrJpa1b jKbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=XY1G3xrj9ACsixsmmu+yB6GrKznH4qRnT+CbbXqG+E4=; b=rKYAyHG0eURd0L+r2tNH2cHyY+FXBM1TXM5uTyMKHXSoI9hXJ7pnkhf/slqgouD2pF j3a7AQaht/z412ytz/vPs9OKXZb8hm16Em1ytxJGeWWrNYZ7KCDQ3g9gOIGhmqwCmkSa GLEQP32XaUxYhlwnonjM0cYVtdBk2fqbBP8KJFIF+IfQSYQgugZb/psz8C6cOj2RI7Z2 17NlMAYDajKnRphNcwT+zrOO/x+BK6NuZZU8aSC1rifAnYJgR7ZdYolCB7YnjKP2zhhp vggqWLATTdYJ70Z90tFqUmR6+quNQcVkmVfX9lUkqjSLxPF7H1BBggAspaNpRk9eFQmL 8NTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c19si18814123pfi.256.2019.07.25.07.22.48; Thu, 25 Jul 2019 07:23:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390558AbfGYNsg (ORCPT + 99 others); Thu, 25 Jul 2019 09:48:36 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:54090 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389122AbfGYNsg (ORCPT ); Thu, 25 Jul 2019 09:48:36 -0400 X-IronPort-AV: E=Sophos;i="5.64,306,1559512800"; d="scan'208";a="393302470" Received: from c-73-22-29-55.hsd1.il.comcast.net (HELO hadrien) ([73.22.29.55]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2019 15:48:32 +0200 Date: Thu, 25 Jul 2019 08:48:30 -0500 (CDT) From: Julia Lawall X-X-Sender: jll@hadrien To: Markus Elfring cc: cocci@systeme.lip6.fr, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, David Laight , Joe Perches Subject: Re: [PATCH 1/2] string: Add stracpy and stracpy_pad mechanisms In-Reply-To: <7e489aa8-95ea-b3b0-9023-ba284212977f@web.de> Message-ID: References: <7e489aa8-95ea-b3b0-9023-ba284212977f@web.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 25 Jul 2019, Markus Elfring wrote: > > @r@ > > identifier f,i1,i2; > > struct i1 e1; > > expression e2; > > position p; > > @@ > > \(strscpy\|strlcpy\)(e1.f, e2, i2)@p > > I have got the impression that the replacement can work also > without an inherited position variable at the end. > How do you think about to omit this SmPL rule then? > > Can it be nicer to reduce duplicate SmPL code a bit? Huh? Rule 2 is important, to ensure that ths size is correct. Without rule 1, how can rule 2 be checked? julia