chiark / gitweb /
fix gcc warnings about uninitialized variables
[elogind.git] / src / libsystemd / sd-login / sd-login.c
index f71749f72d4d136c15a480cf218764986551abf4..cc0677bdf21c94a72e9ea36d1ac76aebd699f6f4 100644 (file)
@@ -82,7 +82,7 @@ _public_ int sd_pid_get_owner_uid(pid_t pid, uid_t *uid) {
 }
 
 _public_ int sd_peer_get_session(int fd, char **session) {
-        struct ucred ucred;
+        struct ucred ucred = {};
         int r;
 
         assert_return(fd >= 0, -EINVAL);