*headdesk*

Jan 26, 2016 16:26

So, you've got a code in C that needs to allocate X objects of size Y. So, you start with malloc(X*Y). Then you discover X*Y may produce overflow, so you make function alloc(X, Y) that checks for overflows.

And then of course everybody starts using it as alloc(1, X*Y). Because it's the same thing, right?

This entry was originally posted at http://stas.dreamwidth.org/1015482.html.

профессия, лытдыбр

Previous post Next post
Up