Re: [PATCH 3/2] commit: remove find_header_mem()

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

 



Jeff King <peff@xxxxxxxx> writes:

>> +const char *find_commit_header(const char *msg, const char *key, size_t *out_len)
>>  {
>>  	int key_len = strlen(key);
>>  	const char *line = msg;
>
> Not new in your patch, but assigning strlen() to int tingled my
> spider-sense. It's OK, though, because "key" is always a small string
> literal.

Yup.  All callers of find_commit_header() give in-program constants
and never an externally sourced random string there.

> So the conversion looks good to me.

Thanks.  Will queue.





[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]

  Powered by Linux