Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed build_distance_tables return value #5363

Merged
merged 1 commit into from Mar 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 3 additions & 8 deletions src/libImaging/Quant.c
Expand Up @@ -789,7 +789,7 @@ resort_distance_tables(
return 1;
}

static int
static void
build_distance_tables(
uint32_t *avgDist, uint32_t **avgDistSortKey, Pixel *p, uint32_t nEntries) {
uint32_t i, j;
Expand All @@ -811,7 +811,6 @@ build_distance_tables(
sizeof(uint32_t *),
_sort_ulong_ptr_keys);
}
return 1;
}

static int
Expand Down Expand Up @@ -1373,9 +1372,7 @@ quantize(
goto error_6;
}

if (!build_distance_tables(avgDist, avgDistSortKey, p, nPaletteEntries)) {
goto error_7;
}
build_distance_tables(avgDist, avgDistSortKey, p, nPaletteEntries);

if (!map_image_pixels_from_median_box(
pixelData, nPixels, p, nPaletteEntries, h, avgDist, avgDistSortKey, qp)) {
Expand Down Expand Up @@ -1580,9 +1577,7 @@ quantize2(
goto error_3;
}

if (!build_distance_tables(avgDist, avgDistSortKey, p, nQuantPixels)) {
goto error_4;
}
build_distance_tables(avgDist, avgDistSortKey, p, nQuantPixels);

if (!map_image_pixels(
pixelData, nPixels, p, nQuantPixels, avgDist, avgDistSortKey, qp)) {
Expand Down