Re: simple question about the function memcmp in kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 08 Apr 2013 08:57:01 +0800, Ben Wu said:

> int memcmp(const void *cs, const void *ct, size_t count)
> {

> I want to know why it use the temp pointer su1, su2? why it doesn't directly
> use the cs and ct pointer?

This is a C 101 question, not a kernel question.  But anyhow..

They're declared const, so the compiler will whine about ++'ing them.

Attachment: pgpYIKPJ7g429.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux