Re: [PATCH 4/3] archive: specfile syntax change: "$Format:%PLCHLDR$" instead of just "%PLCHLDR"

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

 



René Scharfe schrieb:
> Johannes Schindelin schrieb:
>>> +
>>> +		b = memchr(a, '$', len);
>>> +		if (!b || a + len < b + 9 || memcmp(b + 1, "Format:", 7))
>>> +			break;
>> Wouldn't memmem(buffer, len, "$Format:", 8) be better here?
> 
> Oh, that's a nice GNU extension, didn't know it before.  We might import
> it to compat etc., but I think that's better left for a follow-up patch.

Just noticed: if the memcmp() above finds a difference, the code should
*not* break out of the loop.  Ahem.  Perhaps I should first add memmem()
after all...

René
-
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]

  Powered by Linux