Skip to content

Commit

Permalink
Test fixes from the rollup
Browse files Browse the repository at this point in the history
Closes #15807 (Deprecate some unsafe functions in `str::raw` and remove `OwnedStr` trait)
Closes #15859 (Implement `Show` for `CString` and fix warning compiling tests for libcollections)
Closes #15911 (Updated LLVM for iOS)
Closes #15925 (libsyntax: Remove `~self` and `mut ~self` from the language.)
Closes #15930 (Add examples for Checked[Add|Sub|Mul|Div])
Closes #15933 (rustdoc: make table of contents optional)
Closes #15937 (librustc: Make bare functions implement the `FnMut` trait.)
Closes #15938 (librustc: Check structure constructors against their types.)
Closes #15939 (rustdoc: Add a --crate-name option)
Closes #15942 (Document trie collections)
Closes #15943 (Document SmallIntMap)
  • Loading branch information
alexcrichton committed Jul 24, 2014
1 parent dff1406 commit 1031ad8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libnative/io/addrinfo.rs
Expand Up @@ -27,7 +27,9 @@ impl GetAddrInfoRequest {
assert!(host.is_some() || servname.is_some());

let c_host = host.map(|x| x.to_c_str());
let c_host = c_host.as_ref().map(|x| x.as_ptr()).unwrap_or(null());
let c_serv = servname.map(|x| x.to_c_str());
let c_serv = c_serv.as_ref().map(|x| x.as_ptr()).unwrap_or(null());

let hint = hint.map(|hint| {
libc::addrinfo {
Expand All @@ -49,9 +51,7 @@ impl GetAddrInfoRequest {

// Make the call
let s = unsafe {
let ch = if c_host.is_none() { null() } else { c_host.unwrap().as_ptr() };
let cs = if c_serv.is_none() { null() } else { c_serv.unwrap().as_ptr() };
getaddrinfo(ch, cs, hint_ptr, &mut res)
getaddrinfo(c_host, c_serv, hint_ptr, &mut res)
};

// Error?
Expand Down

9 comments on commit 1031ad8

@bors
Copy link
Contributor

@bors bors commented on 1031ad8 Jul 24, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at alexcrichton@1031ad8

@bors
Copy link
Contributor

@bors bors commented on 1031ad8 Jul 24, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging alexcrichton/rust/rollup = 1031ad8 into auto

@bors
Copy link
Contributor

@bors bors commented on 1031ad8 Jul 24, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alexcrichton/rust/rollup = 1031ad8 merged ok, testing candidate = 44dc6972

@bors
Copy link
Contributor

@bors bors commented on 1031ad8 Jul 24, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at alexcrichton@1031ad8

@bors
Copy link
Contributor

@bors bors commented on 1031ad8 Jul 24, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging alexcrichton/rust/rollup = 1031ad8 into auto

@bors
Copy link
Contributor

@bors bors commented on 1031ad8 Jul 24, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alexcrichton/rust/rollup = 1031ad8 merged ok, testing candidate = 4461f03

@bors
Copy link
Contributor

@bors bors commented on 1031ad8 Jul 24, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 4461f03

Please sign in to comment.