Re: [PATCH] nfs-utils: Support binding to source address.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



greearb@xxxxxxxxxxxxxxx wrote:

  +	if (local_ip && local_ip->is_set) {
  +		sa = (struct sockaddr *)(char *)(&local_ip->addr);
  +		salen = local_ip->addrlen;
  +	} else {
  +		switch (family) {
  +		case AF_INET:
  +			sa = (struct sockaddr *)(char *)&sin;
  +			salen = sizeof(sin);
  +			break;
  +		case AF_INET6:
  +			sa = (struct sockaddr *)(char *)&sin6;
  +			salen = sizeof(sin6);
  +		default:
  +			break;
  +		}

Are the double casts actually necessary?  And if so, shouldn't the inner one
be (void *)?
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux