Re: [PATCH] general style: replaces memcmp() with starts_with()

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

 



On Thu, Mar 13, 2014 at 12:22 AM, Jens Lehmann <Jens.Lehmann@xxxxxx> wrote:
> That spot uses memcmp() because ce->name may
> not be 0-terminated.

ce->name is 0-terminated (at least if it's created the normal way, I
haven't checked where this "ce" in submodule.c comes from).
ce_namelen() is just an optimization because we happen to store name's
length if it's shorter than 4096, so there's no need to
strlen(ce->name) again.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]