* [PATCH] sound: core: Fix format string mismatch in seq_midi.c
@ 2014-04-22 11:42 Masanari Iida
2014-04-28 10:18 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Masanari Iida @ 2014-04-22 11:42 UTC (permalink / raw)
To: tiwai, perex, linux-kernel, alsa-devel; +Cc: Masanari Iida
Fix format string mismatch in snd_seq_midisynth_register_port().
Argument type of p is unsigned int.
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
---
sound/core/seq/seq_midi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
index 3e05c55..a1fd77a 100644
--- a/sound/core/seq/seq_midi.c
+++ b/sound/core/seq/seq_midi.c
@@ -362,13 +362,13 @@ snd_seq_midisynth_register_port(struct snd_seq_device *dev)
if (! port->name[0]) {
if (info->name[0]) {
if (ports > 1)
- snprintf(port->name, sizeof(port->name), "%s-%d", info->name, p);
+ snprintf(port->name, sizeof(port->name), "%s-%u", info->name, p);
else
snprintf(port->name, sizeof(port->name), "%s", info->name);
} else {
/* last resort */
if (ports > 1)
- sprintf(port->name, "MIDI %d-%d-%d", card->number, device, p);
+ sprintf(port->name, "MIDI %d-%d-%u", card->number, device, p);
else
sprintf(port->name, "MIDI %d-%d", card->number, device);
}
--
2.0.0.rc0.26.g779792a
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sound: core: Fix format string mismatch in seq_midi.c
2014-04-22 11:42 [PATCH] sound: core: Fix format string mismatch in seq_midi.c Masanari Iida
@ 2014-04-28 10:18 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2014-04-28 10:18 UTC (permalink / raw)
To: Masanari Iida; +Cc: perex, linux-kernel, alsa-devel
At Tue, 22 Apr 2014 20:42:05 +0900,
Masanari Iida wrote:
>
> Fix format string mismatch in snd_seq_midisynth_register_port().
> Argument type of p is unsigned int.
>
> Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Thanks, applied.
Takashi
> ---
> sound/core/seq/seq_midi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
> index 3e05c55..a1fd77a 100644
> --- a/sound/core/seq/seq_midi.c
> +++ b/sound/core/seq/seq_midi.c
> @@ -362,13 +362,13 @@ snd_seq_midisynth_register_port(struct snd_seq_device *dev)
> if (! port->name[0]) {
> if (info->name[0]) {
> if (ports > 1)
> - snprintf(port->name, sizeof(port->name), "%s-%d", info->name, p);
> + snprintf(port->name, sizeof(port->name), "%s-%u", info->name, p);
> else
> snprintf(port->name, sizeof(port->name), "%s", info->name);
> } else {
> /* last resort */
> if (ports > 1)
> - sprintf(port->name, "MIDI %d-%d-%d", card->number, device, p);
> + sprintf(port->name, "MIDI %d-%d-%u", card->number, device, p);
> else
> sprintf(port->name, "MIDI %d-%d", card->number, device);
> }
> --
> 2.0.0.rc0.26.g779792a
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-28 10:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-22 11:42 [PATCH] sound: core: Fix format string mismatch in seq_midi.c Masanari Iida
2014-04-28 10:18 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).