On Sat, Jan 01, 2011 at 10:00:30PM +0100, Sam Ravnborg wrote: > + for (i = 0; i < LOOKBACK; ++i) { > + if (buffer[i + 0] == 'H' && buffer[i + 1] == 'd' && > + buffer[i + 2] == 'r' && buffer[i + 3] == 'S') { > + return offset + i; > + } > + } > - for (q = buffer, r = q + 512; q < r; q += 4) { > - if (*q == 'H' && q[1] == 'd' && q[2] == 'r' && q[3] == 'S') > - break; > - } BTW, while the new code is eminently more readable in general, is there a reason to slow down that search by using increments of 1 instead of 4? Did the old one ever miss? -- 2. That which causes joy or happiness. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html