int fd, yes = 1; 
int fd = -EINVAL, yes = 1, err = -EINVAL;; 
static int mcast_open(void *data){	struct mcast_data *pri = data;	struct sockaddr_in *sin = pri->mcast_addr;	struct ip_mreq mreq;	int fd, yes = 1;	if ((sin->sin_addr.s_addr == 0) || (sin->sin_port == 0)) {		fd = -EINVAL;		goto out;	}	fd = socket(AF_INET, SOCK_DGRAM, 0);	if (fd < 0){		printk("mcast_open : data socket failed, errno = %d\n", 		       errno);		fd = -ENOMEM;		goto out;	}	if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) < 0) {		printk("mcast_open: SO_REUSEADDR failed, errno = %d\n",			errno);		os_close_file(fd);		fd = -EINVAL;		goto out;	}	/* set ttl according to config */	if (setsockopt(fd, SOL_IP, IP_MULTICAST_TTL, &pri->ttl,		       sizeof(pri->ttl)) < 0) {		printk("mcast_open: IP_MULTICAST_TTL failed, error = %d\n",			errno);		os_close_file(fd);		fd = -EINVAL;		goto out;	}	/* set LOOP, so data does get fed back to local sockets */	if (setsockopt(fd, SOL_IP, IP_MULTICAST_LOOP, &yes, sizeof(yes)) < 0) {		printk("mcast_open: IP_MULTICAST_LOOP failed, error = %d\n",			errno);		os_close_file(fd);		fd = -EINVAL;		goto out;	}	/* bind socket to mcast address */	if (bind(fd, (struct sockaddr *) sin, sizeof(*sin)) < 0) {		printk("mcast_open : data bind failed, errno = %d\n", errno);		os_close_file(fd);		fd = -EINVAL;		goto out;	}				/* subscribe to the multicast group */	mreq.imr_multiaddr.s_addr = sin->sin_addr.s_addr;	mreq.imr_interface.s_addr = 0;	if (setsockopt(fd, SOL_IP, IP_ADD_MEMBERSHIP, 		       &mreq, sizeof(mreq)) < 0) {		printk("mcast_open: IP_ADD_MEMBERSHIP failed, error = %d\n",			errno);		printk("There appears not to be a multicast-capable network "		       "interface on the host.\n");		printk("eth0 should be configured in order to use the "		       "multicast transport.\n");		os_close_file(fd);		fd = -EINVAL;	} out:	return(fd);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/7c00c31fc0f003363773121a0ac6f4e5b128e879/mcast_user.c/buggy/arch/um/drivers/mcast_user.c