Re: [PATCHv3 4/6] urlmatch.h: fix include guard
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Aug 15, 2018, 05:25 UTC
- Message-ID
- <20180815052527.GF32543@aiede.svl.corp.google.com>
- In-Reply-To
- <20180813171749.10481-5-newren@gmail.com>
Elijah Newren wrote:
> Signed-off-by: Elijah Newren <newren@gmail.com> > --- > urlmatch.h | 2 ++ > 1 file changed, 2 insertions(+)
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
This has two benefits:
- avoids the definitions in this header from being evaluated twice
- many compilers recognize the #include guard idiom and also are able to avoid re-reading the text of the header twice, too
The header guard had been broken since day one. Is there a tool that can detect this class of problem?