sound: core: Fix format string mismatch in seq_midi.c
PATCH 1/1 sound: core: Fix format string mismatch in seq_midi.c
Fix format string mismatch in snd_seq_midisynth_register_port(). Argument type of p is unsigned int.
Signed-off-by Masanari Iida <[email protected]>
--- sound/core/seq/seq_midi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/core/seq/seq_midi.c +2 -2
@@ -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); }
Signature · 1 line
2.0.0.rc0.26.g779792a
Takashi Iwai
AppliedAt Tue, 22 Apr 2014 20:42:05 +0900,
Quoted 5 lines · Masanari Iida
Fix format string mismatch in
snd_seq_midisynth_register_port(). Argument type of p is unsigned int.Signed-off-by Masanari Iida <[email protected]>
Thanks, applied.
Takashi
Quoted 27 lines
--- sound/core/seq/seq_midi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)sound/core/seq/seq_midi.c +2
-2@@ -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); }Signature · 1 line
2.0.0.rc0.26.g779792a