Skip to content

Commit

Permalink
replace memset by memset_s where it might get optimized away
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelienpierre committed Nov 19, 2023
1 parent 3b08349 commit d354c26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/iop/cacorrect.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ void process(struct dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, const
for(int top = -border; top < height; top += ts - border2)
for(int left = -border; left < width; left += ts - border2)
{
memset(buffer, 0, buffersize);
memset_s(buffer, 0, buffersize);
const int vblock = ((top + border) / (ts - border2)) + 1;
const int hblock = ((left + border) / (ts - border2)) + 1;
const int bottom = MIN(top + ts, height + border);
Expand Down
2 changes: 1 addition & 1 deletion src/iop/demosaic/lmmse.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static void lmmse_demosaic(dt_dev_pixelpipe_iop_t *piece, float *const restrict
{
qix[i] = qix[i - 1] + LMMSE_GRP * LMMSE_GRP;
}
memset(buffer, 0, sizeof(float) * LMMSE_GRP * LMMSE_GRP * 6);
memset_s(buffer, 0, sizeof(float) * LMMSE_GRP * LMMSE_GRP * 6);

#ifdef _OPENMP
#pragma omp for schedule(simd:dynamic, 6) collapse(2)
Expand Down

0 comments on commit d354c26

Please sign in to comment.