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