]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
user-util: remove dead code
authorLuca Boccassi <bluca@debian.org>
Wed, 17 Jan 2024 14:55:05 +0000 (14:55 +0000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 17 Jan 2024 16:11:15 +0000 (16:11 +0000)
The branch explicitly checks that all of these ret_ variables are NULL,
so they will never be used.

Follow-up for 83e9b584dba1352493d8d2337bfe20d923d5163b

CID#1533239
CID#1533240
CID#1533241

src/basic/user-util.c

index a0a47aee4f8e04d25cda9f0bf0936e848c5b6f6e..1cea96242e7cc2349838ef83b755a545ac37c631 100644 (file)
@@ -280,12 +280,6 @@ int get_user_creds(
 
                         if (ret_uid)
                                 *ret_uid = u;
-                        if (ret_gid)
-                                *ret_gid = GID_INVALID;
-                        if (ret_home)
-                                *ret_home = NULL;
-                        if (ret_shell)
-                                *ret_shell = NULL;
 
                         return 0;
                 }