aboutsummaryrefslogtreecommitdiffstats
path: root/libgamma_gamma_ramps8_initialise.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-03-07 22:51:21 +0100
committerMattias Andrée <maandree@kth.se>2021-03-07 22:51:21 +0100
commitbaa6a1cf7979c095c1081daa2a2d1134c76d2f1b (patch)
treed0525238a334091eb4d241b0b83da1a4a1793d5b /libgamma_gamma_ramps8_initialise.c
parentStart replacing info manual with man pages (diff)
downloadlibgamma-baa6a1cf7979c095c1081daa2a2d1134c76d2f1b.tar.gz
libgamma-baa6a1cf7979c095c1081daa2a2d1134c76d2f1b.tar.bz2
libgamma-baa6a1cf7979c095c1081daa2a2d1134c76d2f1b.tar.xz
misc
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libgamma_gamma_ramps8_initialise.c')
-rw-r--r--libgamma_gamma_ramps8_initialise.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgamma_gamma_ramps8_initialise.c b/libgamma_gamma_ramps8_initialise.c
index 6c64614..04bf465 100644
--- a/libgamma_gamma_ramps8_initialise.c
+++ b/libgamma_gamma_ramps8_initialise.c
@@ -13,10 +13,10 @@
* @return Zero on success, -1 on allocation error, `errno` will be set accordingly
*/
int
-libgamma_gamma_ramps8_initialise(libgamma_gamma_ramps8_t *restrict this)
+libgamma_gamma_ramps8_initialise(struct libgamma_gamma_ramps8 *restrict this)
{
size_t n = this->red_size + this->green_size + this->blue_size;
- this->red = malloc(n * sizeof(uint8_t));
+ this->red = malloc(n * sizeof(*this->red));
this->green = &this-> red[this-> red_size];
this->blue = &this->green[this->green_size];
return this->red ? 0 : -1;