Skip to contentSkip to conversation

sound/sparc/dbri.c: snd_dbri_pcm(): strcpy(pcm->name, card->shortname)?

DISCUSSION Roel Kluin 2 participants 2 messages Mar 20, 2008

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

from sound/sparc/dbri.c:2233:

strcpy(pcm->name, card->shortname);

shouldn't that be 'strcpy(card->shortname, pcm->name)'?

#1 lore raw

Re: sound/sparc/dbri.c: snd_dbri_pcm(): strcpy(pcm->name,

From: Roel Kluin <[email protected]>
Date: Thu, 20 Mar 2008 18:09:53 +0100

Quoted 5 lines

from sound/sparc/dbri.c:2233:

strcpy(pcm->name, card->shortname);

shouldn't that be 'strcpy(card->shortname, pcm->name)'?

Just like the NIU case your analysis is inaccurate.

strcpy() copies the second argument string to the first argument's string area.

dbri_probe() sets pcm->shortname, and here we are propagating that string to pcm->name