simple question about the function memcmp in kernel

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Sun Apr 7 22:29:38 EDT 2013


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 


More information about the Kernelnewbies mailing list