Changed style for consistency

This commit is contained in:
Andrew Murray 2020-12-26 21:49:40 +11:00 committed by GitHub
parent fd14616dbb
commit 51b8137924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
} }