aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-14 22:06:57 +0200
committerMax Kellermann <max@duempel.org>2011-09-14 22:06:57 +0200
commit8c6e8a6eb87dfbb38c6a1047d0868f565837abfa (patch)
treeccb3c3f2977873dafa3b2323803264e12f2fd724
parentdd33317f459f7dad954cb9d155a93339fe6d163c (diff)
downloadmpd-8c6e8a6eb87dfbb38c6a1047d0868f565837abfa.tar.gz
mpd-8c6e8a6eb87dfbb38c6a1047d0868f565837abfa.tar.xz
mpd-8c6e8a6eb87dfbb38c6a1047d0868f565837abfa.zip
input_internal: add assertions
Diffstat (limited to '')
-rw-r--r--src/input_internal.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/input_internal.c b/src/input_internal.c
index 2ef66b260..4d675fc97 100644
--- a/src/input_internal.c
+++ b/src/input_internal.c
@@ -21,10 +21,16 @@
#include "input_internal.h"
#include "input_stream.h"
+#include <assert.h>
+
void
input_stream_init(struct input_stream *is, const struct input_plugin *plugin,
const char *uri)
{
+ assert(is != NULL);
+ assert(plugin != NULL);
+ assert(uri != NULL);
+
is->plugin = plugin;
is->uri = g_strdup(uri);
is->ready = false;
@@ -37,6 +43,9 @@ input_stream_init(struct input_stream *is, const struct input_plugin *plugin,
void
input_stream_deinit(struct input_stream *is)
{
+ assert(is != NULL);
+ assert(is->plugin != NULL);
+
g_free(is->uri);
g_free(is->mime);
}