aboutsummaryrefslogtreecommitdiffstats
path: root/libgamma_gamma_ramps16_initialise.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgamma_gamma_ramps16_initialise.c')
-rw-r--r--libgamma_gamma_ramps16_initialise.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgamma_gamma_ramps16_initialise.c b/libgamma_gamma_ramps16_initialise.c
index c1c55cb..08d242b 100644
--- a/libgamma_gamma_ramps16_initialise.c
+++ b/libgamma_gamma_ramps16_initialise.c
@@ -13,14 +13,14 @@
* @return Zero on success, -1 on allocation error, `errno` will be set accordingly
*/
int
-libgamma_gamma_ramps16_initialise(libgamma_gamma_ramps16_t *restrict this)
+libgamma_gamma_ramps16_initialise(struct libgamma_gamma_ramps16 *restrict this)
{
size_t n = this->red_size + this->green_size + this->blue_size;
#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
/* Valgrind complains about us reading uninitialize memory if we just use malloc */
- this->red = calloc(n, sizeof(uint16_t));
+ this->red = calloc(n, sizeof(*this->red));
#else
- this->red = malloc(n * sizeof(uint16_t));
+ this->red = malloc(n * sizeof(*this->red));
#endif
this->green = &this-> red[this-> red_size];
this->blue = &this->green[this->green_size];