Re: [PATCH 3/5] revert: Allow mixed pick and revert instructions

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

 



Ramkumar Ramachandra wrote:

> Good point.  I'm tempted to check (q - p < 40); is there a better way
> to do this by not hardcoding "40" perhaps?

Something like the following seems idiomatic.

	if (q - p + 1 > sizeof(buf))
		return error(...);
	memcpy(buf, p, q - p);
	buf[q - p] = '\0';
--
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]