aboutsummaryrefslogtreecommitdiffstats
path: root/l4array.c
diff options
context:
space:
mode:
Diffstat (limited to 'l4array.c')
-rw-r--r--l4array.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/l4array.c b/l4array.c
index 5e1a69a..99e0aa4 100644
--- a/l4array.c
+++ b/l4array.c
@@ -98,13 +98,7 @@ LbsArray* lbs_array_cat (LbsArray* dest, const LbsArray* more) {
void* lbs_array_ref_generic (void* array_generic) {
LbsArray* array = LBS_ARRAY (array_generic);
- int oldref = array->ref_count;
- int newref = oldref + 1;
- if (newref <= oldref) {
- return NULL;
- }
-
- array->ref_count = newref;
+ array->ref_count++;
return array;
}