chiark / gitweb /
Remove unnecessary casts in printfs
[elogind.git] / src / login / pam-module.c
index 1259457efc5f43351a6cf2f826e8a228cdeb91cf..262621d43fd3631eaa14b5d033d7be0f58217ac4 100644 (file)
@@ -184,7 +184,7 @@ static int export_legacy_dbus_address(
                 return PAM_SUCCESS;
 
         if (asprintf(&s, KERNEL_USER_BUS_FMT ";" UNIX_USER_BUS_FMT,
-                     (unsigned long) uid, runtime) < 0) {
+                     uid, runtime) < 0) {
                 pam_syslog(handle, LOG_ERR, "Failed to set bus variable.");
                 return PAM_BUF_ERR;
         }
@@ -252,7 +252,7 @@ _public_ PAM_EXTERN int pam_sm_open_session(
         if (streq_ptr(service, "systemd-user")) {
                 _cleanup_free_ char *p = NULL, *rt = NULL;
 
-                if (asprintf(&p, "/run/systemd/users/%lu", (unsigned long) pw->pw_uid) < 0)
+                if (asprintf(&p, "/run/systemd/users/"UID_FMT, pw->pw_uid) < 0)
                         return PAM_BUF_ERR;
 
                 r = parse_env_file(p, NEWLINE,