Completely clear out conference buffers.
This fixes an error and quiets the following warning pointed out by gcc 7.3.0: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size] memset(chan->conflast, 0, DAHDI_MAX_CHUNKSIZE); Previously only the first half of the conference buffers were cleared out.
This commit is contained in:
parent
d3c9e43437
commit
14d8754e34
@ -5709,9 +5709,9 @@ static int dahdi_ioctl_setconf(struct file *file, unsigned long data)
|
||||
}
|
||||
/* if changing confs, clear last added info */
|
||||
if (conf.confno != chan->confna) {
|
||||
memset(chan->conflast, 0, DAHDI_MAX_CHUNKSIZE);
|
||||
memset(chan->conflast1, 0, DAHDI_MAX_CHUNKSIZE);
|
||||
memset(chan->conflast2, 0, DAHDI_MAX_CHUNKSIZE);
|
||||
memset(chan->conflast, 0, sizeof(chan->conflast));
|
||||
memset(chan->conflast1, 0, sizeof(chan->conflast1));
|
||||
memset(chan->conflast2, 0, sizeof(chan->conflast2));
|
||||
}
|
||||
oldconf = chan->confna; /* save old conference number */
|
||||
chan->confna = conf.confno; /* set conference number */
|
||||
|
Loading…
Reference in New Issue
Block a user