mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 01:34:24 +03:00
Changed style for consistency
This commit is contained in:
parent
fd14616dbb
commit
51b8137924
|
@ -44,7 +44,7 @@ ImagingHistogramNew(Imaging im)
|
||||||
|
|
||||||
/* Create histogram descriptor */
|
/* Create histogram descriptor */
|
||||||
h = calloc(1, sizeof(struct ImagingHistogramInstance));
|
h = calloc(1, sizeof(struct ImagingHistogramInstance));
|
||||||
if (h == NULL) {
|
if (!h) {
|
||||||
return (ImagingHistogram) ImagingError_MemoryError();
|
return (ImagingHistogram) ImagingError_MemoryError();
|
||||||
}
|
}
|
||||||
strncpy(h->mode, im->mode, IMAGING_MODE_LENGTH-1);
|
strncpy(h->mode, im->mode, IMAGING_MODE_LENGTH-1);
|
||||||
|
@ -52,7 +52,7 @@ ImagingHistogramNew(Imaging im)
|
||||||
|
|
||||||
h->bands = im->bands;
|
h->bands = im->bands;
|
||||||
h->histogram = calloc(im->pixelsize, 256 * sizeof(long));
|
h->histogram = calloc(im->pixelsize, 256 * sizeof(long));
|
||||||
if (h->histogram == NULL) {
|
if (!h->histogram) {
|
||||||
free(h);
|
free(h);
|
||||||
return (ImagingHistogram) ImagingError_MemoryError();
|
return (ImagingHistogram) ImagingError_MemoryError();
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ ImagingGetHistogram(Imaging im, Imaging imMask, void* minmax)
|
||||||
}
|
}
|
||||||
|
|
||||||
h = ImagingHistogramNew(im);
|
h = ImagingHistogramNew(im);
|
||||||
if (h == NULL) {
|
if (!h) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user