diff options
author | Leon Scroggins III <scroggo@google.com> | 2018-07-16 10:43:45 -0400 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2018-08-28 13:49:52 +0000 |
commit | 3993b37fb9b483af215e7e3712e5087d7f35b9c7 (patch) | |
tree | a279b3c434699ae6969c7c36068cf79b86cf0d21 /jmemnobs.c | |
parent | f5c8ca7bb600d1e5488f65c6d5447b19b18d899c (diff) |
Update libjpeg-turbo to 2.0.0
Bug: 78329453
Update to upstream at https://github.com/libjpeg-turbo/libjpeg-turbo/tree/2.0.0
This includes a fix for a bug that could result in an infinite loop.
ChangeLog.md contains detailed changes about the upstream library. Changes
I made are below:
- Remove files that are no longer in upstream, and include all current
files from upstream.
- Update various references to the version.
Android.bp:
- Update to build new files/files in new locations.
- Run bpfmt
README.android:
- Remove cherry-pick references, as they are no longer needed.
- Remove modification in jsimdext.inc, which no longer appears to be
necessary.
README.version:
- Use the github URL, as it is now the official upstream build
- Replace msarett as OWNER, as he no longer works on this project
- Update the version
Change-Id: Ie6cfee5a8f820f28656bbb305f500e75e7ce7915
Diffstat (limited to 'jmemnobs.c')
-rw-r--r-- | jmemnobs.c | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -4,7 +4,7 @@ * This file was part of the Independent JPEG Group's software: * Copyright (C) 1992-1996, Thomas G. Lane. * libjpeg-turbo Modifications: - * Copyright (C) 2017, D. R. Commander. + * Copyright (C) 2017-2018, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg * file. * @@ -23,8 +23,8 @@ #include "jmemsys.h" /* import the system-dependent declarations */ #ifndef HAVE_STDLIB_H /* <stdlib.h> should declare malloc(),free() */ -extern void *malloc (size_t size); -extern void free (void *ptr); +extern void *malloc(size_t size); +extern void free(void *ptr); #endif @@ -34,13 +34,13 @@ extern void free (void *ptr); */ GLOBAL(void *) -jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +jpeg_get_small(j_common_ptr cinfo, size_t sizeofobject) { - return (void *) malloc(sizeofobject); + return (void *)malloc(sizeofobject); } GLOBAL(void) -jpeg_free_small (j_common_ptr cinfo, void *object, size_t sizeofobject) +jpeg_free_small(j_common_ptr cinfo, void *object, size_t sizeofobject) { free(object); } @@ -51,13 +51,13 @@ jpeg_free_small (j_common_ptr cinfo, void *object, size_t sizeofobject) */ GLOBAL(void *) -jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +jpeg_get_large(j_common_ptr cinfo, size_t sizeofobject) { - return (void *) malloc(sizeofobject); + return (void *)malloc(sizeofobject); } GLOBAL(void) -jpeg_free_large (j_common_ptr cinfo, void *object, size_t sizeofobject) +jpeg_free_large(j_common_ptr cinfo, void *object, size_t sizeofobject) { free(object); } @@ -68,11 +68,11 @@ jpeg_free_large (j_common_ptr cinfo, void *object, size_t sizeofobject) */ GLOBAL(size_t) -jpeg_mem_available (j_common_ptr cinfo, size_t min_bytes_needed, - size_t max_bytes_needed, size_t already_allocated) +jpeg_mem_available(j_common_ptr cinfo, size_t min_bytes_needed, + size_t max_bytes_needed, size_t already_allocated) { if (cinfo->mem->max_memory_to_use) { - if (cinfo->mem->max_memory_to_use > already_allocated) + if ((size_t)cinfo->mem->max_memory_to_use > already_allocated) return cinfo->mem->max_memory_to_use - already_allocated; else return 0; @@ -90,8 +90,8 @@ jpeg_mem_available (j_common_ptr cinfo, size_t min_bytes_needed, */ GLOBAL(void) -jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) +jpeg_open_backing_store(j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) { ERREXIT(cinfo, JERR_NO_BACKING_STORE); } @@ -103,13 +103,13 @@ jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, */ GLOBAL(long) -jpeg_mem_init (j_common_ptr cinfo) +jpeg_mem_init(j_common_ptr cinfo) { return 0; /* just set max_memory_to_use to 0 */ } GLOBAL(void) -jpeg_mem_term (j_common_ptr cinfo) +jpeg_mem_term(j_common_ptr cinfo) { /* no work */ } |