From 48e8701fe4f63b1f4113def34a68b8d262f1cdc0 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Thu, 13 Mar 2014 13:15:15 +1100 Subject: [PATCH] * const on errstr ptr --- src/image.c | 3 ++- src/image.h | 2 +- src/test-image.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/image.c b/src/image.c index 1c86168..430eaeb 100644 --- a/src/image.c +++ b/src/image.c @@ -18,10 +18,11 @@ #include #include "main.h" +#include "bitmap.h" #include "image.h" image_t * -image_from_file(const char *path, char **errstr) +image_from_file(const char *path, const char **errstr) { const char *mimetype; magic_t magic; diff --git a/src/image.h b/src/image.h index 585045c..d86d62d 100644 --- a/src/image.h +++ b/src/image.h @@ -6,6 +6,6 @@ typedef struct } image_t; image_t * -image_from_file(const char *path, char **errstr); +image_from_file(const char *path, const char **errstr); #endif #define HAS_IMAGE_H diff --git a/src/test-image.c b/src/test-image.c index 0225944..365cd7a 100644 --- a/src/test-image.c +++ b/src/test-image.c @@ -1,11 +1,12 @@ #include #include "main.h" +#include "bitmap.h" #include "image.h" int main(int argc, char **argv) { image_t *img = NULL; - char *err; + const char *err = NULL; img = image_from_file("test.png", &err); if (img == NULL) {