git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* weird strncmp usage?
@ 2006-11-02  1:26 Han-Wen Nienhuys
  2006-11-02  1:44 ` Andy Whitcroft
  0 siblings, 1 reply; 7+ messages in thread
From: Han-Wen Nienhuys @ 2006-11-02  1:26 UTC (permalink / raw)
  To: git


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-11-03 21:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-02  1:26 weird strncmp usage? Han-Wen Nienhuys
2006-11-02  1:44 ` Andy Whitcroft
2006-11-02  6:51   ` Jeff King
2006-11-02  9:15     ` Johannes Schindelin
2006-11-02  9:59       ` Han-Wen Nienhuys
2006-11-02 11:04   ` Petr Baudis
2006-11-03 21:05   ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).