diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-06-14 16:20:26 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-06-14 18:51:57 -0400 |
commit | 6e7a7052e01ef8e44891e9290c5275c3b3d6e07d (patch) | |
tree | 81f9e5a45a2219c0f849d82d774c4addc3103872 /gobject/gatomicarray.c | |
parent | ba6e66bff1684c0ef0af603f18b0ca53ed7c45fd (diff) | |
download | glib-6e7a7052e01ef8e44891e9290c5275c3b3d6e07d.tar.gz |
Remove a redundant assertion
A gsize is never going below 0.
Diffstat (limited to 'gobject/gatomicarray.c')
-rw-r--r-- | gobject/gatomicarray.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gobject/gatomicarray.c b/gobject/gatomicarray.c index 2c2a09cf9..d621e945f 100644 --- a/gobject/gatomicarray.c +++ b/gobject/gatomicarray.c @@ -110,6 +110,10 @@ _g_atomic_array_init (GAtomicArray *array) * This means you can use this to grow the * array part and it handles the first element * being added automatically. + * + * We don't support shrinking arrays, as if + * we then re-grow we may reuse an old pointer + * value and confuse the transaction check. */ gpointer _g_atomic_array_copy (GAtomicArray *array, @@ -119,11 +123,6 @@ _g_atomic_array_copy (GAtomicArray *array, guint8 *new, *old; gsize old_size, new_size; - /* We don't support shrinking arrays, as if - we then re-grow we may reuse an old pointer - value and confuse the transaction check. */ - g_assert (additional_element_size >= 0); - G_LOCK (array); old = g_atomic_pointer_get (&array->data); if (old) |