weird strncmp usage?
- From
Han-Wen Nienhuys <hanwen@xs4all.nl>
- Date
- Nov 2, 2006, 01:26 UTC
- Message-ID
- <eibhga$tpg$1@sea.gmane.org>
Hi,
the git source seems full of calls similar to
strncmp (x, "constant string", 15)
is there a reason not to use something like
int
strxmp (char const *x, char const *y)
{
return strncmp (x, y, strlen (y));
}everywhere?
-- Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen