Rev 9189 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9189 | Rev 9765 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | #include |
- | |
2 | #include |
1 | #include |
- | 2 | #include |
|
3 | #include |
3 | #include |
Line 4... | Line 4... | ||
4 | 4 | ||
- | 5 | void* calloc(size_t num, size_t size) |
|
5 | void *calloc(size_t num, size_t size) { |
6 | { |
6 | void *ptr = _ksys_alloc(num*size); |
7 | void* ptr = _ksys_alloc(num * size); |
7 | if(!ptr){ |
8 | if (!ptr) { |
8 | errno = ENOMEM; |
9 | __errno = ENOMEM; |
9 | return NULL; |
10 | return NULL; |
10 | } |
11 | } |
11 | memset(ptr, 0, num*size); |
12 | memset(ptr, 0, num * size); |
12 | return ptr; |
13 | return ptr; |