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

Diff of /alsa/alsa-kernel/core/seq/seq_ports.c

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

revision 1.1.1.1 by vizard, Tue Apr 15 21:53:15 2003 UTC revision 1.2 by vizard, Sun Jun 15 21:01:30 2003 UTC
# Line 338  int snd_seq_set_port_info(client_port_t Line 338  int snd_seq_set_port_info(client_port_t
338          snd_assert(port && info, return -EINVAL);          snd_assert(port && info, return -EINVAL);
339    
340          /* set port name */          /* set port name */
341          if (info->name[0]) {          if (info->name[0])
342                  strncpy(port->name, info->name, sizeof(port->name)-1);                  strlcpy(port->name, info->name, sizeof(port->name));
                 port->name[sizeof(port->name)-1] = '\0';  
         }  
343                    
344          /* set capabilities */          /* set capabilities */
345          port->capability = info->capability;          port->capability = info->capability;
# Line 363  int snd_seq_get_port_info(client_port_t Line 361  int snd_seq_get_port_info(client_port_t
361          snd_assert(port && info, return -EINVAL);          snd_assert(port && info, return -EINVAL);
362    
363          /* get port name */          /* get port name */
364          strncpy(info->name, port->name, sizeof(info->name));          strlcpy(info->name, port->name, sizeof(info->name));
365                    
366          /* get capabilities */          /* get capabilities */
367          info->capability = port->capability;          info->capability = port->capability;
# Line 621  int snd_seq_event_port_attach(int client Line 619  int snd_seq_event_port_attach(int client
619          /* Set up the port */          /* Set up the port */
620          memset(&portinfo, 0, sizeof(portinfo));          memset(&portinfo, 0, sizeof(portinfo));
621          portinfo.addr.client = client;          portinfo.addr.client = client;
622          if (portname)          strlcpy(portinfo.name, portname ? portname : "Unamed port",
623                  strncpy(portinfo.name, portname, sizeof(portinfo.name));                  sizeof(portinfo.name));
         else  
                 sprintf(portinfo.name, "Unamed port");  
624    
625          portinfo.capability = cap;          portinfo.capability = cap;
626          portinfo.type = type;          portinfo.type = type;

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