From 35bc2ccbb89a6b499e0e3b6f7095afea214f0c59 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 5 May 2019 22:46:40 +0100 Subject: change content get_source_data interfaces to return uint8_t and size_t previously these interfaces returned char * and unsigned int which was undesirable. --- content/handlers/text/textplain.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'content/handlers/text/textplain.c') diff --git a/content/handlers/text/textplain.c b/content/handlers/text/textplain.c index 692ba7ebe..9e9e3e9e0 100644 --- a/content/handlers/text/textplain.c +++ b/content/handlers/text/textplain.c @@ -554,8 +554,8 @@ static nserror textplain_clone(const struct content *old, struct content **newc) const textplain_content *old_text = (textplain_content *) old; textplain_content *text; nserror error; - const char *data; - unsigned long size; + const uint8_t *data; + size_t size; text = calloc(1, sizeof(textplain_content)); if (text == NULL) @@ -576,7 +576,9 @@ static nserror textplain_clone(const struct content *old, struct content **newc) data = content__get_source_data(&text->base, &size); if (size > 0) { - if (textplain_process_data(&text->base, data, size) == false) { + if (textplain_process_data(&text->base, + (const char *)data, + size) == false) { content_destroy(&text->base); return NSERROR_NOMEM; } -- cgit v1.2.3