strcat+strcat+strcat == baaad

Alexandre Julliard julliard at winehq.com
Sun Dec 1 12:44:06 CST 2002


Shachar Shemesh <wine-devel at sun.consumer.org.il> writes:

> Well - still snprintf is more efficient.

I don't think so, but feel free to provide benchmarks.

> But there is also no reason not to welcome these submissions if
> someone already took the time to submit them.

There's no objective reason why sprintf is better than strcat in that
case, it's purely a matter of personal taste. As such, whoever writes
the code in the first place gets to choose the way it's done. What if
I apply that patch and someone sends a patch tomorrow changing the
sprintfs back into strcats because he prefers that?  Should I apply
it?  After all he took the time to submit it too...

-- 
Alexandre Julliard
julliard at winehq.com



More information about the wine-devel mailing list