aboutsummaryrefslogtreecommitdiff
path: root/src/backend_libjpeg.c
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2019-06-13 22:08:29 +0100
committerHarry Jeffery <harry@exec64.co.uk>2019-06-13 22:17:12 +0100
commitb4028e981aab656acacae8ff2b5b1d88f64d0236 (patch)
tree0c5936fd8b382660b7ea553cc718331f902cbec2 /src/backend_libjpeg.c
parentc544285c9390c02aa8473705dea18bbf03c1ffaf (diff)
downloadimv-b4028e981aab656acacae8ff2b5b1d88f64d0236.tar.gz
Add imv_log
Diffstat (limited to 'src/backend_libjpeg.c')
-rw-r--r--src/backend_libjpeg.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/backend_libjpeg.c b/src/backend_libjpeg.c
index d1e0b17..e8942eb 100644
--- a/src/backend_libjpeg.c
+++ b/src/backend_libjpeg.c
@@ -1,6 +1,8 @@
#include "backend_libjpeg.h"
#include "backend.h"
#include "source.h"
+
+#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/mman.h>
@@ -53,11 +55,7 @@ static struct imv_bitmap *to_imv_bitmap(int width, int height, void *bitmap)
static void report_error(struct imv_source *src)
{
- if (!src->callback) {
- fprintf(stderr, "imv_source(%s) has no callback configured. "
- "Discarding error.\n", src->name);
- return;
- }
+ assert(src->callback);
struct imv_source_message msg;
msg.source = src;
@@ -71,11 +69,7 @@ static void report_error(struct imv_source *src)
static void send_bitmap(struct imv_source *src, void *bitmap)
{
- if (!src->callback) {
- fprintf(stderr, "imv_source(%s) has no callback configured. "
- "Discarding result.\n", src->name);
- return;
- }
+ assert(src->callback);
struct imv_source_message msg;
msg.source = src;