mirror of https://github.com/xzeldon/htop.git
Be stricter!
This commit is contained in:
parent
d311e85b91
commit
5c593fae42
2
XAlloc.c
2
XAlloc.c
|
@ -27,7 +27,7 @@ void* xMalloc(size_t size) {
|
||||||
|
|
||||||
void* xCalloc(size_t nmemb, size_t size) {
|
void* xCalloc(size_t nmemb, size_t size) {
|
||||||
void* data = calloc(nmemb, size);
|
void* data = calloc(nmemb, size);
|
||||||
if (!data && nmemb > 0 && size > 0) {
|
if (!data) {
|
||||||
curs_set(1);
|
curs_set(1);
|
||||||
endwin();
|
endwin();
|
||||||
write(2, oomMessage, sizeof oomMessage - 1);
|
write(2, oomMessage, sizeof oomMessage - 1);
|
||||||
|
|
Loading…
Reference in New Issue