diff options
author | Russ Cox <rsc@swtch.com> | 2012-09-08 13:53:59 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2012-09-08 13:53:59 -0400 |
commit | 4db1ecb904b545dbc067634d1ae39ef5bc37e525 (patch) | |
tree | ef5e5e0e62e57b8c2f3ff395b265d134de4d4737 | |
parent | d905d2f5fe89ae5b2c97d74ae9955a8e9dda87e5 (diff) | |
download | plan9port-4db1ecb904b545dbc067634d1ae39ef5bc37e525.tar.gz plan9port-4db1ecb904b545dbc067634d1ae39ef5bc37e525.tar.bz2 plan9port-4db1ecb904b545dbc067634d1ae39ef5bc37e525.zip |
lib9: remove ss_len manipulation in _p9dialparse
Not all systems have ss_len, and we've never set it before.
R=rsc
http://codereview.appspot.com/6497102
-rw-r--r-- | src/lib9/_p9dialparse.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/lib9/_p9dialparse.c b/src/lib9/_p9dialparse.c index da23a412..4ff4d3cc 100644 --- a/src/lib9/_p9dialparse.c +++ b/src/lib9/_p9dialparse.c @@ -108,17 +108,14 @@ p9dialparse(char *addr, char **pnet, char **punix, void *phost, int *pport) /* translate host */ if(strcmp(host, "*") == 0){ ss->ss_family = AF_INET6; - ss->ss_len = sizeof(struct sockaddr_in6); ((struct sockaddr_in6*)ss)->sin6_addr = in6addr_any; }else if((he = gethostbyname(host)) != nil){ ss->ss_family = he->h_addrtype; switch(ss->ss_family){ case AF_INET: - ss->ss_len = sizeof(struct sockaddr_in); ((struct sockaddr_in*)ss)->sin_addr = *(struct in_addr*) *(he->h_addr_list); break; case AF_INET6: - ss->ss_len = sizeof(struct sockaddr_in6); ((struct sockaddr_in6*)ss)->sin6_addr = *(struct in6_addr*) *(he->h_addr_list); break; default: |