News for hackers. Stuff that matters.
Re:Dyson air purifier outperformed by cheap DIY box fan filt... by froh on Friday February 12, 2021 @01:03AM (#26111139)
malloc, free and their little pointers snicker from behind a curtain.
Re:Dyson air purifier outperformed by cheap DIY box fan filt... by IgorPartola on Friday February 12, 2021 @07:21AM (#26112890)
I haven’t had as much trouble with those as they mostly do what it says on the tin. strcpy(), sprintf(), etc. all have slightly different semantics and even their “n” versions will do funky things if you don’t very carefully account for null termination. I find it way harder to use those because I have to keep remembering which of them does what regarding \0 at the end. And I guess now we have strlcpy() which is supposed to fix those issues but isn’t available on all platforms I use.