3 ms·
saying "dont use" something isn't really actionable, unless you give a safe alternative.
by 38 3y ago
saying "dont use" something isn't really actionable, unless you give a safe alternative.
- thiht 3y agoAnd explain why it’s not safe too
- jjnoakes 3y agoThe safe alternatives are in the article.
- cozzyd 3y agoasprintf is often a better choice if you're heap allocating anyway. For a static or stack buffer, obviously snprintf, unless you know the maximum possible length won't exceed (which you often do....).