[Commotion-admin] [commotiond] fixed malloc call (3118541)

Josh King notifications at github.com
Fri Dec 6 15:37:36 UTC 2013


Calloc takes two arguments, the first is the number of memory segments you want, and the second is the size of each segment. In order to use it as I advised in place of malloc, you would ask for 1 memory segment of size 16*sizeof(char), or 16 segments of size sizeof(char). It should amount to the same thing, calloc(16, sizeof(char)) seems cleaner.

---
Reply to this email directly or view it on GitHub:
https://github.com/opentechinstitute/commotiond/commit/3118541296dea55c0824ea78343af444d853ed19#commitcomment-4793737
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chambana.net/pipermail/commotion-admin/attachments/20131206/0751b899/attachment.html>


More information about the Commotion-admin mailing list