diff --git a/src/unistd/src/getopt.rs b/src/unistd/src/getopt.rs
index 0f8e538f20e34798ceb0ae56d066d121ae9aa2fa..2790529a359767db20d5199335e9aa5db7249d4e 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