Ushering out strlcpy()
Ushering out strlcpy()
Posted Aug 29, 2022 19:26 UTC (Mon) by tialaramex (subscriber, #21167)In reply to: Ushering out strlcpy() by wtarreau
Parent article: Ushering out strlcpy()
This might be more compelling with experimental results but I'd be astonished if it made a discernible difference actually. Without such results I don't see any reason I shouldn't argue the exact opposite, that your solution is needlessly complicated and dangerous.
BurntSushi did this work because of ripgrep which is processing rather more data than a HTTP User-agent header. I can well believe it's worth doing all that for running grep over an entire monorepo or a few weeks log files or whatever but I have my doubts for Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0 which is, as I count it, 70 bytes.
