simple question about the function memcmp in kernel
Burke
crayben at yahoo.cn
Sun Apr 7 23:52:23 EDT 2013
于 2013-4-8 10:29, Valdis.Kletnieks at vt.edu 写道:
> 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. :)
Dear Max,Valdis:
I got it, many thanks for your kindly reply.
More information about the Kernelnewbies
mailing list