utils: slightly speed up the calculation of the size of a buffer

Achieve this by eliding two conditions from the inner loop,
which is possible because 'end' will never be NULL.
1 file changed