mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-05 01:40:11 -05:00
seq: seq.c - fix calloc arguments
The usage was inverted. The first argument is count of elements, the second one is size of one element. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
0bb35d4980
commit
305168fd22
1 changed files with 1 additions and 1 deletions
|
|
@ -1356,7 +1356,7 @@ int snd_seq_set_input_buffer_size(snd_seq_t *seq, size_t size)
|
||||||
if (size != seq->ibufsize) {
|
if (size != seq->ibufsize) {
|
||||||
char *newbuf;
|
char *newbuf;
|
||||||
/* use ump event size for avoiding reallocation at switching */
|
/* use ump event size for avoiding reallocation at switching */
|
||||||
newbuf = calloc(sizeof(snd_seq_ump_event_t), size);
|
newbuf = calloc(size, sizeof(snd_seq_ump_event_t));
|
||||||
if (newbuf == NULL)
|
if (newbuf == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
free(seq->ibuf);
|
free(seq->ibuf);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue