projects
/
platform
/
upstream
/
libatomic_ops.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
2011-06-03 Ivan Maidanski <ivmai@mail.ru>
[platform/upstream/libatomic_ops.git]
/
tests
/
test_stack.c
diff --git
a/tests/test_stack.c
b/tests/test_stack.c
index
a190a78
..
a51d244
100644
(file)
--- a/
tests/test_stack.c
+++ b/
tests/test_stack.c
@@
-54,6
+54,11
@@
void add_elements(int n)
if (n == 0) return;
add_elements(n-1);
le = malloc(sizeof(list_element));
+ if (le == 0)
+ {
+ fprintf(stderr, "Out of memory\n");
+ abort();
+ }
le -> data = n;
AO_stack_push(&the_list, (AO_t *)le);
}