lua: Fixed some cross-platform issues for PPC (and probably other architectures)
[openwrt.git] / target / linux / generic-2.4 / patches / 222-sound.patch
1 Index: linux-2.4.35.4/drivers/sound/sound_core.c
2 ===================================================================
3 --- linux-2.4.35.4.orig/drivers/sound/sound_core.c
4 +++ linux-2.4.35.4/drivers/sound/sound_core.c
5 @@ -174,9 +174,9 @@ static int sound_insert_unit(struct soun
6 }
7
8 if (r == low)
9 - sprintf (name_buf, "%s", name);
10 + snprintf (name_buf, sizeof(name_buf), "%s", name);
11 else
12 - sprintf (name_buf, "%s%d", name, (r - low) / SOUND_STEP);
13 + snprintf (name_buf, sizeof(name_buf), "%s%d", name, (r - low) / SOUND_STEP);
14 s->de = devfs_register (devfs_handle, name_buf,
15 DEVFS_FL_NONE, SOUND_MAJOR, s->unit_minor,
16 S_IFCHR | mode, fops, NULL);
17 @@ -507,9 +507,9 @@ int soundcore_open(struct inode *inode,
18 * ALSA toplevel modules for soundcards, thus we need
19 * load them at first. [Jaroslav Kysela <perex@jcu.cz>]
20 */
21 - sprintf(mod, "sound-slot-%i", unit>>4);
22 + snprintf(mod, sizeof(mod), "sound-slot-%i", unit>>4);
23 request_module(mod);
24 - sprintf(mod, "sound-service-%i-%i", unit>>4, chain);
25 + snprintf(mod, sizeof(mod), "sound-service-%i-%i", unit>>4, chain);
26 request_module(mod);
27 spin_lock(&sound_loader_lock);
28 s = __look_for_unit(chain, unit);
This page took 0.043678 seconds and 5 git commands to generate.