more requested changes

This commit is contained in:
Paul Sajna
2018-03-15 11:55:37 -07:00
parent 52acce0d34
commit cdfde8c0d4
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -205,8 +205,8 @@ pub fn unlink(path: *const c_char) -> c_int {
pub fn waitpid(pid: pid_t, stat_loc: *mut c_int, options: c_int) -> pid_t {
unsafe {
let mut temp: usize = 0;
let mut res = e(syscall::waitpid(pid as usize, &mut temp, options as usize));
if !stat_loc.is_null() {
let res = e(syscall::waitpid(pid as usize, &mut temp, options as usize));
if !stat_loc.is_null() {
*stat_loc = temp as c_int;
}
res