From aad079a6690dcc24d685423625766a47d243b36f Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sun, 14 Aug 2016 16:44:56 +1000 Subject: [PATCH] Fixed typos --- _imagingcms.c | 2 +- decode.c | 6 +++--- libImaging/QuantOctree.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/_imagingcms.c b/_imagingcms.c index a05e5cdc690..830a03721c1 100644 --- a/_imagingcms.c +++ b/_imagingcms.c @@ -729,7 +729,7 @@ static cmsBool _calculate_rgb_primaries(CmsProfileObject* self, cmsCIEXYZTRIPLE* /* http://littlecms2.blogspot.com/2009/07/less-is-more.html */ - // double array of RGB values with max on each identitiy + // double array of RGB values with max on each identity hXYZ = cmsCreateXYZProfile(); if (hXYZ == NULL) return 0; diff --git a/decode.c b/decode.c index 7bb88d94e8e..482449c85de 100644 --- a/decode.c +++ b/decode.c @@ -204,7 +204,7 @@ _setimage(ImagingDecoderObject* decoder, PyObject* args) } state->bytes = (state->bits * state->xsize+7)/8; } - /* malloc check ok, oveflow checked above */ + /* malloc check ok, overflow checked above */ state->buffer = (UINT8*) malloc(state->bytes); if (!state->buffer) return PyErr_NoMemory(); @@ -233,7 +233,7 @@ _setfd(ImagingDecoderObject* decoder, PyObject* args) Py_XINCREF(fd); state->fd = fd; - + Py_INCREF(Py_None); return Py_None; } @@ -874,7 +874,7 @@ PyImaging_Jpeg2KDecoderNew(PyObject* self, PyObject* args) decoder->cleanup = ImagingJpeg2KDecodeCleanup; context = (JPEG2KDECODESTATE *)decoder->state.context; - + context->fd = fd; context->length = (off_t)length; context->format = codec_format; diff --git a/libImaging/QuantOctree.c b/libImaging/QuantOctree.c index ede3ad634d8..e18ab3c65a2 100644 --- a/libImaging/QuantOctree.c +++ b/libImaging/QuantOctree.c @@ -311,7 +311,7 @@ static Pixel * create_palette_array(const ColorBucket palette, unsigned int paletteLength) { Pixel *paletteArray; unsigned int i; - + /* malloc check ok, calloc for overflow */ paletteArray = calloc(paletteLength, sizeof(Pixel)); if (!paletteArray) return NULL; @@ -407,7 +407,7 @@ int quantize_octree(Pixel *pixelData, /* remove the used fine colors from the coarse cube */ subtract_color_buckets(coarseCube, paletteBucketsFine, nFineColors); - /* did the substraction cleared one or more coarse bucket? */ + /* did the subtraction cleared one or more coarse bucket? */ while (nCoarseColors > count_used_color_buckets(coarseCube)) { /* then we can use the free buckets for fine colors */ nAlreadySubtracted = nFineColors;