From: Bob Copeland <email@bobcopeland.com>
To: "Kurtis D. Rader" <kdrader@us.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: Platform device matching, & weird strncmp usage
Date: Sat, 7 Jan 2006 14:42:50 -0500 [thread overview]
Message-ID: <b6c5339f0601071142i78db77e1v7c8056197bb43dab@mail.gmail.com> (raw)
In-Reply-To: <20060107192458.GA12409@us.ibm.com>
On 1/7/06, Kurtis D. Rader <kdrader@us.ibm.com> wrote:
> On Fri, 2006-01-06 16:59:39, Benjamin Herrenschmidt wrote:
> > As far as I know, strncmp() is _NOT_ supposed to return 0 if one string
> > is shorter than the other and they match until that point
> I can't speak to the correctness of that code but your understanding of
> strncmp() is incorrect. From "GNU C Library Application Fundamentals":
I believe the original poster was asserting that
'strncmp("abc","abcd",100) should never return zero,' and not
'strncmp("abc","abcd",3) should never return zero.' Though I also
found the statement confusing at first.
-Bob
next prev parent reply other threads:[~2006-01-07 19:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-06 5:59 Benjamin Herrenschmidt
2006-01-06 6:04 ` Benjamin Herrenschmidt
2006-01-06 18:53 ` Russell King
2006-01-06 21:38 ` Benjamin Herrenschmidt
2006-01-07 19:24 ` Kurtis D. Rader
2006-01-07 19:42 ` Bob Copeland [this message]
2006-01-07 22:14 ` Benjamin Herrenschmidt
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=b6c5339f0601071142i78db77e1v7c8056197bb43dab@mail.gmail.com \
--to=email@bobcopeland.com \
--cc=benh@kernel.crashing.org \
--cc=kdrader@us.ibm.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®