[libgdata/clang: 7/8] [core] Add an assertion to back up a comment
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata/clang: 7/8] [core] Add an assertion to back up a comment
- Date: Sun, 8 Aug 2010 22:54:43 +0000 (UTC)
commit 79d0bc7cecbe704297214b747f21240fe3eae629
Author: Philip Withnall <philip withnall collabora co uk>
Date: Sat Aug 7 19:29:36 2010 +0100
[core] Add an assertion to back up a comment
gdata/gdata-buffer.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gdata/gdata-buffer.c b/gdata/gdata-buffer.c
index 8d73a28..f75bcf7 100644
--- a/gdata/gdata-buffer.c
+++ b/gdata/gdata-buffer.c
@@ -288,6 +288,8 @@ gdata_buffer_pop_data (GDataBuffer *self, guint8 *data, gsize length_requested,
/* If the requested length is still > 0, it must be < chunk->length, and chunk must != NULL (if it does, the cached total_length has
* been corrupted somewhere). */
if (G_LIKELY (length_remaining > 0)) {
+ g_assert (chunk != NULL);
+
/* Copy the requested data to the output */
memcpy (data, chunk->data, length_remaining);
self->head_read_offset = length_remaining;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]