/[openvortex]/alsa/alsa-kernel/core/seq/oss/seq_oss_synth.c
ViewVC logotype

Diff of /alsa/alsa-kernel/core/seq/oss/seq_oss_synth.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by vizard, Tue Apr 15 21:53:17 2003 UTC revision 1.2 by vizard, Sun Jun 15 21:01:30 2003 UTC
# Line 117  snd_seq_oss_synth_register(snd_seq_devic Line 117  snd_seq_oss_synth_register(snd_seq_devic
117          snd_use_lock_init(&rec->use_lock);          snd_use_lock_init(&rec->use_lock);
118    
119          /* copy and truncate the name of synth device */          /* copy and truncate the name of synth device */
120          strncpy(rec->name, dev->name, sizeof(rec->name));          strlcpy(rec->name, dev->name, sizeof(rec->name));
         rec->name[sizeof(rec->name)-1] = 0;  
121    
122          /* registration */          /* registration */
123          spin_lock_irqsave(&register_lock, flags);          spin_lock_irqsave(&register_lock, flags);
# Line 450  snd_seq_oss_synth_reset(seq_oss_devinfo_ Line 449  snd_seq_oss_synth_reset(seq_oss_devinfo_
449   */   */
450  int  int
451  snd_seq_oss_synth_load_patch(seq_oss_devinfo_t *dp, int dev, int fmt,  snd_seq_oss_synth_load_patch(seq_oss_devinfo_t *dp, int dev, int fmt,
452                              const char *buf, int p, int c)                              const char __user *buf, int p, int c)
453  {  {
454          seq_oss_synth_t *rec;          seq_oss_synth_t *rec;
455          int rc;          int rc;
# Line 611  snd_seq_oss_synth_make_info(seq_oss_devi Line 610  snd_seq_oss_synth_make_info(seq_oss_devi
610                  inf->synth_subtype = 0;                  inf->synth_subtype = 0;
611                  inf->nr_voices = 16;                  inf->nr_voices = 16;
612                  inf->device = dev;                  inf->device = dev;
613                  strncpy(inf->name, minf.name, sizeof(inf->name));                  strlcpy(inf->name, minf.name, sizeof(inf->name));
614          } else {          } else {
615                  if ((rec = get_synthdev(dp, dev)) == NULL)                  if ((rec = get_synthdev(dp, dev)) == NULL)
616                          return -ENXIO;                          return -ENXIO;
# Line 619  snd_seq_oss_synth_make_info(seq_oss_devi Line 618  snd_seq_oss_synth_make_info(seq_oss_devi
618                  inf->synth_subtype = rec->synth_subtype;                  inf->synth_subtype = rec->synth_subtype;
619                  inf->nr_voices = rec->nr_voices;                  inf->nr_voices = rec->nr_voices;
620                  inf->device = dev;                  inf->device = dev;
621                  strncpy(inf->name, rec->name, sizeof(inf->name));                  strlcpy(inf->name, rec->name, sizeof(inf->name));
622                  snd_use_lock_free(&rec->use_lock);                  snd_use_lock_free(&rec->use_lock);
623          }          }
624          return 0;          return 0;

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26