From 2751d457bf815333b2ba8f96b544d1fe5aa49b83 Mon Sep 17 00:00:00 2001
From: Alex Lyon <arcterus@mail.com>
Date: Mon, 19 Mar 2018 15:05:38 -0700
Subject: [PATCH] unistd: use .is_null() for pointers

---
 src/unistd/src/getopt.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/unistd/src/getopt.rs b/src/unistd/src/getopt.rs
index 0f8e538f..2790529a 100644
--- a/src/unistd/src/getopt.rs
+++ b/src/unistd/src/getopt.rs
@@ -30,12 +30,12 @@ pub unsafe extern "C" fn getopt(
     argv: *const *mut c_char,
     optstring: *const c_char,
 ) -> c_int {
-    if CURRENT_OPT == ptr::null_mut() || *CURRENT_OPT == 0 {
+    if CURRENT_OPT.is_null() || *CURRENT_OPT == 0 {
         if optind >= argc {
             -1
         } else {
             let current_arg = *argv.offset(optind as isize);
-            if current_arg == ptr::null_mut() || *current_arg != b'-' as c_char
+            if current_arg.is_null() || *current_arg != b'-' as c_char
                 || string::strcmp(current_arg, b"-\0".as_ptr() as _) == 0
             {
                 -1
-- 
GitLab