summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libjpeg/src/jdatadst.c
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2022-03-02 10:43:34 +0100
committerEirik Aavitsland <eirik.aavitsland@qt.io>2022-03-02 17:58:07 +0100
commit03b930470365bd32f93d761bc823d456e8de6853 (patch)
tree83a8efec1fbcc58aa9335fcf32c601da164a2bc8 /src/3rdparty/libjpeg/src/jdatadst.c
parentea3a7aaf2bf0e0e067423a7e19c457a4f26516cc (diff)
Update bundled libjpeg-turbo to version 2.1.3
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.1.3 Pick-to: 6.3 6.2 5.15 Change-Id: I69ebd10641b07af324f6ae056cddb65cc0b5ce82 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/3rdparty/libjpeg/src/jdatadst.c')
-rw-r--r--src/3rdparty/libjpeg/src/jdatadst.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/3rdparty/libjpeg/src/jdatadst.c b/src/3rdparty/libjpeg/src/jdatadst.c
index 246fffb58a..6b4fed2339 100644
--- a/src/3rdparty/libjpeg/src/jdatadst.c
+++ b/src/3rdparty/libjpeg/src/jdatadst.c
@@ -5,7 +5,7 @@
* Copyright (C) 1994-1996, Thomas G. Lane.
* Modified 2009-2012 by Guido Vollbeding.
* libjpeg-turbo Modifications:
- * Copyright (C) 2013, 2016, D. R. Commander.
+ * Copyright (C) 2013, 2016, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -23,11 +23,6 @@
#include "jpeglib.h"
#include "jerror.h"
-#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare malloc(),free() */
-extern void *malloc(size_t size);
-extern void free(void *ptr);
-#endif
-
/* Expanded data destination object for stdio output */
@@ -116,7 +111,7 @@ empty_output_buffer(j_compress_ptr cinfo)
{
my_dest_ptr dest = (my_dest_ptr)cinfo->dest;
- if (JFWRITE(dest->outfile, dest->buffer, OUTPUT_BUF_SIZE) !=
+ if (fwrite(dest->buffer, 1, OUTPUT_BUF_SIZE, dest->outfile) !=
(size_t)OUTPUT_BUF_SIZE)
ERREXIT(cinfo, JERR_FILE_WRITE);
@@ -141,7 +136,7 @@ empty_mem_output_buffer(j_compress_ptr cinfo)
if (nextbuffer == NULL)
ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10);
- MEMCOPY(nextbuffer, dest->buffer, dest->bufsize);
+ memcpy(nextbuffer, dest->buffer, dest->bufsize);
free(dest->newbuffer);
@@ -175,7 +170,7 @@ term_destination(j_compress_ptr cinfo)
/* Write any data remaining in the buffer */
if (datacount > 0) {
- if (JFWRITE(dest->outfile, dest->buffer, datacount) != datacount)
+ if (fwrite(dest->buffer, 1, datacount, dest->outfile) != datacount)
ERREXIT(cinfo, JERR_FILE_WRITE);
}
fflush(dest->outfile);