cde4fa851d
- Formatted by clang-format (WebKit-style). - Removed unnecessary errno linux. - Added KOS error codes. - String functions have been replaced with more optimal ones for x86. - Changed wrappers for 70 sysfunction. git-svn-id: svn://kolibrios.org@9765 a494cfbc-eb01-0410-851d-a64ba20cac60
15 lines
262 B
C
15 lines
262 B
C
#include <errno.h>
|
|
#include <stdlib.h>
|
|
#include <sys/ksys.h>
|
|
|
|
void* calloc(size_t num, size_t size)
|
|
{
|
|
void* ptr = _ksys_alloc(num * size);
|
|
if (!ptr) {
|
|
__errno = ENOMEM;
|
|
return NULL;
|
|
}
|
|
memset(ptr, 0, num * size);
|
|
return ptr;
|
|
}
|