From: Valdis.Kletnieks@vt.edu (Valdis.Kletnieks at vt.edu)
To: kernelnewbies@lists.kernelnewbies.org
Subject: simple question about the function memcmp in kernel
Date: Sun, 07 Apr 2013 22:29:38 -0400 [thread overview]
Message-ID: <122907.1365388178@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Mon, 08 Apr 2013 05:56:29 +0400." <CAMo8Bf+rQQFOfmA5Wu35YX8YBVAMRB646HP8h8OEtctNLwgn7w@mail.gmail.com>
On Mon, 08 Apr 2013 05:56:29 +0400, Max Filippov said:
> const is the the object they point to, not the pointers themselves
> (that would be
> void * const cs).
>
> memcmp compares bytes at which cs and ct point, but these are void pointers,
> and the expression res = *cs - *ct is thus meaningless.
Max is right, and I'm obviously under-caffienated or something. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130407/a18d4b47/attachment.bin
next prev parent reply other threads:[~2013-04-08 2:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-05 8:50 Interrupt Handler of Ethernet Device Robert Clove
2013-04-05 12:06 ` Rami Rosen
2013-04-05 12:11 ` Robert Clove
2013-04-05 12:24 ` Anuz Pratap Singh Tomar
2013-04-07 2:52 ` ishare
2013-04-07 15:22 ` Rami Rosen
2013-04-08 0:57 ` simple question about the function memcmp in kernel Ben Wu
2013-04-08 1:33 ` Valdis.Kletnieks at vt.edu
2013-04-08 1:56 ` Max Filippov
2013-04-08 2:29 ` Valdis.Kletnieks at vt.edu [this message]
2013-04-08 3:52 ` Burke
2013-04-08 5:42 ` Interrupt Handler of Ethernet Device Robert Clove
2013-04-08 6:41 ` Rami Rosen
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=122907.1365388178@turing-police.cc.vt.edu \
--to=valdis.kletnieks@vt.edu \
--cc=kernelnewbies@lists.kernelnewbies.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).