From: Han-Wen Nienhuys <hanwen@xs4all.nl>
To: git@vger.kernel.org
Subject: weird strncmp usage?
Date: Thu, 02 Nov 2006 02:26:54 +0100 [thread overview]
Message-ID: <eibhga$tpg$1@sea.gmane.org> (raw)
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
next reply other threads:[~2006-11-02 1:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-02 1:26 Han-Wen Nienhuys [this message]
2006-11-02 1:44 ` weird strncmp usage? 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='eibhga$tpg$1@sea.gmane.org' \
--to=hanwen@xs4all.nl \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).