diff src/libpam/handle.rs @ 185:fb8b547b36b7

Banish al(most al)l use of `i32` in favor of `c_int`.
author Paul Fisher <paul@pfish.zone>
date Thu, 31 Jul 2025 14:45:38 -0400
parents 4f46681b3f54
children
line wrap: on
line diff
--- a/src/libpam/handle.rs	Thu Jul 31 14:36:50 2025 -0400
+++ b/src/libpam/handle.rs	Thu Jul 31 14:45:38 2025 -0400
@@ -149,8 +149,8 @@
     }
 
     /// Internal "end" function, which binary-ORs the status with `or_with`.
-    fn end_internal(&mut self, or_with: i32) {
-        let last: i32 = ReturnCode::from(self.last_return.get()).into();
+    fn end_internal(&mut self, or_with: c_int) {
+        let last: c_int = ReturnCode::from(self.last_return.get()).into();
         let result = last | or_with;
         unsafe { libpam_sys::pam_end(self.handle.cast(), result) };
     }
@@ -297,7 +297,7 @@
     #[doc = guide!(adg: "adg-interface-by-app-expected.html#adg-pam_end")]
     #[doc = stdlinks!(3 pam_end)]
     pub fn end_silent(&mut self, result: Result<()>) {
-        let result: i32 = ReturnCode::from(result).into();
+        let result: c_int = ReturnCode::from(result).into();
         #[cfg(pam_impl = "LinuxPam")]
         let result = result | libpam_sys::PAM_DATA_SILENT;
         unsafe {