diff options
author | Mattias Andrée <maandree@kth.se> | 2021-03-07 22:51:21 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-03-07 22:51:21 +0100 |
commit | baa6a1cf7979c095c1081daa2a2d1134c76d2f1b (patch) | |
tree | d0525238a334091eb4d241b0b83da1a4a1793d5b /libgamma_gamma_rampsf_initialise.c | |
parent | Start replacing info manual with man pages (diff) | |
download | libgamma-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_rampsf_initialise.c')
-rw-r--r-- | libgamma_gamma_rampsf_initialise.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgamma_gamma_rampsf_initialise.c b/libgamma_gamma_rampsf_initialise.c index b77fc83..0937bc7 100644 --- a/libgamma_gamma_rampsf_initialise.c +++ b/libgamma_gamma_rampsf_initialise.c @@ -13,10 +13,10 @@ * @return Zero on success, -1 on allocation error, `errno` will be set accordingly */ int -libgamma_gamma_rampsf_initialise(libgamma_gamma_rampsf_t *restrict this) +libgamma_gamma_rampsf_initialise(struct libgamma_gamma_rampsf *restrict this) { size_t n = this->red_size + this->green_size + this->blue_size; - this->red = malloc(n * sizeof(float)); + 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; |