From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.1 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id F08991FAFB for ; Mon, 3 Apr 2017 22:50:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751833AbdDCWut (ORCPT ); Mon, 3 Apr 2017 18:50:49 -0400 Received: from mout.gmx.net ([212.227.15.18]:52356 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751628AbdDCWut (ORCPT ); Mon, 3 Apr 2017 18:50:49 -0400 Received: from virtualbox ([37.201.193.73]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Mgt3g-1cht7U2CsS-00M7Pb; Tue, 04 Apr 2017 00:50:44 +0200 Date: Tue, 4 Apr 2017 00:50:43 +0200 (CEST) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: =?UTF-8?Q?Torsten_B=C3=B6gershausen?= cc: git@vger.kernel.org, Junio C Hamano Subject: Re: [PATCH v2 4/8] Specify explicitly where we parse timestamps In-Reply-To: <1485481a-f2b3-a0a2-89f6-8f55dc241b19@web.de> Message-ID: References: <7876460edaa85d93b60c0cc1b2f9a715de97180c.1491159939.git.johannes.schindelin@gmx.de> <1485481a-f2b3-a0a2-89f6-8f55dc241b19@web.de> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-497804122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hUnoMJ/CQAXxbaBGAKEc4LOBnuQSztqN7Mv7y5s gIKb5Nq Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-497804122-1491259844=:4268 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Hi Torsten, On Mon, 3 Apr 2017, Torsten B=C3=B6gershausen wrote: > [] > > --- a/git-compat-util.h > > +++ b/git-compat-util.h > > @@ -319,6 +319,8 @@ extern char *gitdirname(char *); > > #define PRIo32 "o" > > #endif > > > > +#define parse_timestamp strtoul > > + >=20 > Would > #define parse_timestamp(a,b,c) strtoul((a),(b),(c)) > be more strict ? It would be more pedantic. But I fail to see how it would be more strict: once the preprocessor substituted `parse_timestamp` for whatever we #define'd it to, the C compiler will then validate the calls against the signature of the real function. That validation will be much more strict than merely testing for the correct number of parameters. Ciao, Johannes --8323329-497804122-1491259844=:4268--