Commit 8c6e8a6e authored by Max Kellermann's avatar Max Kellermann

input_internal: add assertions

parent dd33317f
......@@ -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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment