Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
f87462d6
Commit
f87462d6
authored
Feb 02, 2016
by
Hisham
Browse files
Exit on failure!
parent
b2c2b2bf
Changes
1
Show whitespace changes
Inline
Side-by-side
XAlloc.c
View file @
f87462d6
...
@@ -20,6 +20,7 @@ void* xMalloc(size_t size) {
...
@@ -20,6 +20,7 @@ void* xMalloc(size_t size) {
curs_set
(
1
);
curs_set
(
1
);
endwin
();
endwin
();
write
(
2
,
oomMessage
,
sizeof
oomMessage
-
1
);
write
(
2
,
oomMessage
,
sizeof
oomMessage
-
1
);
exit
(
1
);
}
}
return
data
;
return
data
;
}
}
...
@@ -30,6 +31,7 @@ void* xCalloc(size_t nmemb, size_t size) {
...
@@ -30,6 +31,7 @@ void* xCalloc(size_t nmemb, size_t size) {
curs_set
(
1
);
curs_set
(
1
);
endwin
();
endwin
();
write
(
2
,
oomMessage
,
sizeof
oomMessage
-
1
);
write
(
2
,
oomMessage
,
sizeof
oomMessage
-
1
);
exit
(
1
);
}
}
return
data
;
return
data
;
}
}
...
@@ -40,6 +42,7 @@ void* xRealloc(void* ptr, size_t size) {
...
@@ -40,6 +42,7 @@ void* xRealloc(void* ptr, size_t size) {
curs_set
(
1
);
curs_set
(
1
);
endwin
();
endwin
();
write
(
2
,
oomMessage
,
sizeof
oomMessage
-
1
);
write
(
2
,
oomMessage
,
sizeof
oomMessage
-
1
);
exit
(
1
);
}
}
return
data
;
return
data
;
}
}
...
@@ -50,6 +53,7 @@ char* xStrdup(const char* str) {
...
@@ -50,6 +53,7 @@ char* xStrdup(const char* str) {
curs_set
(
1
);
curs_set
(
1
);
endwin
();
endwin
();
write
(
2
,
oomMessage
,
sizeof
oomMessage
-
1
);
write
(
2
,
oomMessage
,
sizeof
oomMessage
-
1
);
exit
(
1
);
}
}
return
data
;
return
data
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment