diff options
author | Vincent Sanders <vince@kyllikki.org> | 2019-05-05 22:46:40 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2019-05-05 22:50:25 +0100 |
commit | 35bc2ccbb89a6b499e0e3b6f7095afea214f0c59 (patch) | |
tree | cd494ae1e33ab55d0e644d11eb973ddde4decbb6 /content/handlers/image/jpeg.c | |
parent | f966580d22d47ab97bceb2f067fc2b9402af01b7 (diff) | |
download | netsurf-35bc2ccbb89a6b499e0e3b6f7095afea214f0c59.tar.gz netsurf-35bc2ccbb89a6b499e0e3b6f7095afea214f0c59.tar.bz2 |
change content get_source_data interfaces to return uint8_t and size_t
previously these interfaces returned char * and unsigned int which was
undesirable.
Diffstat (limited to 'content/handlers/image/jpeg.c')
-rw-r--r-- | content/handlers/image/jpeg.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/content/handlers/image/jpeg.c b/content/handlers/image/jpeg.c index e2f5f8f26..52cdb2201 100644 --- a/content/handlers/image/jpeg.c +++ b/content/handlers/image/jpeg.c @@ -168,8 +168,8 @@ static void nsjpeg_error_exit(j_common_ptr cinfo) static struct bitmap * jpeg_cache_convert(struct content *c) { - uint8_t *source_data; /* Jpeg source data */ - unsigned long source_size; /* length of Jpeg source data */ + const uint8_t *source_data; /* Jpeg source data */ + size_t source_size; /* length of Jpeg source data */ struct jpeg_decompress_struct cinfo; struct jpeg_error_mgr jerr; jmp_buf setjmp_buffer; @@ -188,7 +188,7 @@ jpeg_cache_convert(struct content *c) nsjpeg_term_source }; /* obtain jpeg source data and perfom minimal sanity checks */ - source_data = (uint8_t *)content__get_source_data(c, &source_size); + source_data = content__get_source_data(c, &source_size); if ((source_data == NULL) || (source_size < MIN_JPEG_SIZE)) { @@ -315,8 +315,8 @@ static bool nsjpeg_convert(struct content *c) nsjpeg_skip_input_data, jpeg_resync_to_restart, nsjpeg_term_source }; union content_msg_data msg_data; - const char *data; - unsigned long size; + const uint8_t *data; + size_t size; char *title; /* check image header is valid and get width/height */ |