mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +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 */
|
||||
h = calloc(1, sizeof(struct ImagingHistogramInstance));
|
||||
if (h == NULL) {
|
||||
if (!h) {
|
||||
return (ImagingHistogram) ImagingError_MemoryError();
|
||||
}
|
||||
strncpy(h->mode, im->mode, IMAGING_MODE_LENGTH-1);
|
||||
|
@ -52,7 +52,7 @@ ImagingHistogramNew(Imaging im)
|
|||
|
||||
h->bands = im->bands;
|
||||
h->histogram = calloc(im->pixelsize, 256 * sizeof(long));
|
||||
if (h->histogram == NULL) {
|
||||
if (!h->histogram) {
|
||||
free(h);
|
||||
return (ImagingHistogram) ImagingError_MemoryError();
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ ImagingGetHistogram(Imaging im, Imaging imMask, void* minmax)
|
|||
}
|
||||
|
||||
h = ImagingHistogramNew(im);
|
||||
if (h == NULL) {
|
||||
if (!h) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user