Thread (11 messages) flat view 11 messages, 3 authors, 2016-06-15

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

From: René Scharfe <hidden>
Date: 2016-06-15 22:43:34

Possibly related (same subject, not in this thread)

René Scharfe schrieb:
Johannes Schindelin schrieb:
quoted
quoted
+
+		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é
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help