]> git.alsa-project.org Git - alsa-lib.git/commit
seq: update_group_ports - rewrite blknames update
authorJaroslav Kysela <perex@perex.cz>
Mon, 7 Apr 2025 16:45:42 +0000 (18:45 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 7 Apr 2025 16:46:32 +0000 (18:46 +0200)
commita4e47461eca1decd61fbab42690a55358d77804a
treef77fa6372828f0adbfd229f044e3ed5e2939296b
parent647c001321e0348cbf51234ec9dde0ebd36d05af
seq: update_group_ports - rewrite blknames update

Resolve the warning bellow and use more optimized calls.

seqmid.c: In function ‘update_group_ports’:
seqmid.c:672:45: warning: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 61 [-Wformat-truncation=]
  672 |                                          ", %s", bp->name);
      |                                             ^~
seqmid.c:671:33: note: ‘snprintf’ output between 3 and 130 bytes into a destination of size 63
  671 |                                 snprintf(blknames + len, sizeof(blknames) - len,
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  672 |                                          ", %s", bp->name);
      |                                          ~~~~~~~~~~~~~~~~~

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/seq/seqmid.c