File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
branches/try2/src/libnative/io Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: dff14069c966ad4e4c453a84a42579a846d4863b
8
+ refs/heads/try2: 1031ad8f709839a4d34045c6b116704e639f5cbe
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ impl GetAddrInfoRequest {
27
27
assert ! ( host. is_some( ) || servname. is_some( ) ) ;
28
28
29
29
let c_host = host. map ( |x| x. to_c_str ( ) ) ;
30
+ let c_host = c_host. as_ref ( ) . map ( |x| x. as_ptr ( ) ) . unwrap_or ( null ( ) ) ;
30
31
let c_serv = servname. map ( |x| x. to_c_str ( ) ) ;
32
+ let c_serv = c_serv. as_ref ( ) . map ( |x| x. as_ptr ( ) ) . unwrap_or ( null ( ) ) ;
31
33
32
34
let hint = hint. map ( |hint| {
33
35
libc:: addrinfo {
@@ -49,9 +51,7 @@ impl GetAddrInfoRequest {
49
51
50
52
// Make the call
51
53
let s = unsafe {
52
- let ch = if c_host. is_none ( ) { null ( ) } else { c_host. unwrap ( ) . as_ptr ( ) } ;
53
- let cs = if c_serv. is_none ( ) { null ( ) } else { c_serv. unwrap ( ) . as_ptr ( ) } ;
54
- getaddrinfo ( ch, cs, hint_ptr, & mut res)
54
+ getaddrinfo ( c_host, c_serv, hint_ptr, & mut res)
55
55
} ;
56
56
57
57
// Error?
You can’t perform that action at this time.
0 commit comments