fix endian issue
[openwrt.git] / target / linux / generic-2.4 / patches / 222-sound.patch
1 diff -rNu linux-2.4.30/drivers/sound/sound_core.c linux-2.4.30.new/drivers/sound/sound_core.c
2 --- linux-2.4.30/drivers/sound/sound_core.c 2001-10-01 05:26:08.000000000 +1000
3 +++ linux-2.4.30.new/drivers/sound/sound_core.c 2005-08-27 22:52:55.061719968 +1000
4 @@ -174,9 +174,9 @@
5 }
6
7 if (r == low)
8 - sprintf (name_buf, "%s", name);
9 + snprintf (name_buf, sizeof(name_buf), "%s", name);
10 else
11 - sprintf (name_buf, "%s%d", name, (r - low) / SOUND_STEP);
12 + snprintf (name_buf, sizeof(name_buf), "%s%d", name, (r - low) / SOUND_STEP);
13 s->de = devfs_register (devfs_handle, name_buf,
14 DEVFS_FL_NONE, SOUND_MAJOR, s->unit_minor,
15 S_IFCHR | mode, fops, NULL);
16 @@ -507,9 +507,9 @@
17 * ALSA toplevel modules for soundcards, thus we need
18 * load them at first. [Jaroslav Kysela <perex@jcu.cz>]
19 */
20 - sprintf(mod, "sound-slot-%i", unit>>4);
21 + snprintf(mod, sizeof(mod), "sound-slot-%i", unit>>4);
22 request_module(mod);
23 - sprintf(mod, "sound-service-%i-%i", unit>>4, chain);
24 + snprintf(mod, sizeof(mod), "sound-service-%i-%i", unit>>4, chain);
25 request_module(mod);
26 spin_lock(&sound_loader_lock);
27 s = __look_for_unit(chain, unit);
This page took 0.057458 seconds and 5 git commands to generate.