summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-08-07 12:48:45 +0200
committerLennart Poettering <lennart@poettering.net>2020-01-15 15:28:52 +0100
commit4bad7eedae3db617bd2fa0d6eb664554b4236513 (patch)
treeca875b927b4906d093a54ce367a3465abdaa84b9 /src
parentuserdbd: add userdbctl tool as client for userdbd (diff)
downloadsystemd-4bad7eedae3db617bd2fa0d6eb664554b4236513.tar.xz
systemd-4bad7eedae3db617bd2fa0d6eb664554b4236513.zip
core: make return parameter of dynamic_user_lookup_name() optional
Diffstat (limited to 'src')
-rw-r--r--src/core/dynamic-user.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/dynamic-user.c b/src/core/dynamic-user.c
index 75373407b4..e00109ee4a 100644
--- a/src/core/dynamic-user.c
+++ b/src/core/dynamic-user.c
@@ -529,7 +529,6 @@ int dynamic_user_current(DynamicUser *d, uid_t *ret) {
int r;
assert(d);
- assert(ret);
/* Get the currently assigned UID for the user, if there's any. This simply pops the data from the storage socket, and pushes it back in right-away. */
@@ -545,7 +544,9 @@ int dynamic_user_current(DynamicUser *d, uid_t *ret) {
if (r < 0)
return r;
- *ret = uid;
+ if (ret)
+ *ret = uid;
+
return 0;
}
@@ -732,7 +733,6 @@ int dynamic_user_lookup_name(Manager *m, const char *name, uid_t *ret) {
assert(m);
assert(name);
- assert(ret);
/* A friendly call for translating a dynamic user's name into its UID */