summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-09-06 09:18:33 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-09-16 09:05:42 +0200
commitf68d14855b47842800cb8e530200243fe1171345 (patch)
tree9477ff91152d7e38766564edb5718831c2a84ce8
parent71de68476c1897b8624538ce32218891251fa5f6 (diff)
downloadsystemd-f68d14855b47842800cb8e530200243fe1171345.tar.gz
systemd-f68d14855b47842800cb8e530200243fe1171345.tar.bz2
systemd-f68d14855b47842800cb8e530200243fe1171345.zip
logind: use newer ret var naming style
-rw-r--r--src/login/logind-core.c38
-rw-r--r--src/login/logind.h16
2 files changed, 27 insertions, 27 deletions
diff --git a/src/login/logind-core.c b/src/login/logind-core.c
index 1d21e90a2e..9e4441f829 100644
--- a/src/login/logind-core.c
+++ b/src/login/logind-core.c
@@ -75,7 +75,7 @@ int manager_parse_config_file(Manager *m) {
CONFIG_PARSE_WARN, m);
}
-int manager_add_device(Manager *m, const char *sysfs, bool master, Device **_device) {
+int manager_add_device(Manager *m, const char *sysfs, bool master, Device **ret_device) {
Device *d;
assert(m);
@@ -91,13 +91,13 @@ int manager_add_device(Manager *m, const char *sysfs, bool master, Device **_dev
return -ENOMEM;
}
- if (_device)
- *_device = d;
+ if (ret_device)
+ *ret_device = d;
return 0;
}
-int manager_add_seat(Manager *m, const char *id, Seat **_seat) {
+int manager_add_seat(Manager *m, const char *id, Seat **ret_seat) {
Seat *s;
int r;
@@ -111,13 +111,13 @@ int manager_add_seat(Manager *m, const char *id, Seat **_seat) {
return r;
}
- if (_seat)
- *_seat = s;
+ if (ret_seat)
+ *ret_seat = s;
return 0;
}
-int manager_add_session(Manager *m, const char *id, Session **_session) {
+int manager_add_session(Manager *m, const char *id, Session **ret_session) {
Session *s;
int r;
@@ -131,8 +131,8 @@ int manager_add_session(Manager *m, const char *id, Session **_session) {
return r;
}
- if (_session)
- *_session = s;
+ if (ret_session)
+ *ret_session = s;
return 0;
}
@@ -143,7 +143,7 @@ int manager_add_user(
gid_t gid,
const char *name,
const char *home,
- User **_user) {
+ User **ret_user) {
User *u;
int r;
@@ -158,8 +158,8 @@ int manager_add_user(
return r;
}
- if (_user)
- *_user = u;
+ if (ret_user)
+ *ret_user = u;
return 0;
}
@@ -167,7 +167,7 @@ int manager_add_user(
int manager_add_user_by_name(
Manager *m,
const char *name,
- User **_user) {
+ User **ret_user) {
const char *home = NULL;
uid_t uid;
@@ -181,10 +181,10 @@ int manager_add_user_by_name(
if (r < 0)
return r;
- return manager_add_user(m, uid, gid, name, home, _user);
+ return manager_add_user(m, uid, gid, name, home, ret_user);
}
-int manager_add_user_by_uid(Manager *m, uid_t uid, User **_user) {
+int manager_add_user_by_uid(Manager *m, uid_t uid, User **ret_user) {
struct passwd *p;
assert(m);
@@ -194,7 +194,7 @@ int manager_add_user_by_uid(Manager *m, uid_t uid, User **_user) {
if (!p)
return errno_or_else(ENOENT);
- return manager_add_user(m, uid, p->pw_gid, p->pw_name, p->pw_dir, _user);
+ return manager_add_user(m, uid, p->pw_gid, p->pw_name, p->pw_dir, ret_user);
}
int manager_add_inhibitor(Manager *m, const char* id, Inhibitor **ret) {
@@ -217,7 +217,7 @@ int manager_add_inhibitor(Manager *m, const char* id, Inhibitor **ret) {
return 0;
}
-int manager_add_button(Manager *m, const char *name, Button **_button) {
+int manager_add_button(Manager *m, const char *name, Button **ret_button) {
Button *b;
assert(m);
@@ -230,8 +230,8 @@ int manager_add_button(Manager *m, const char *name, Button **_button) {
return -ENOMEM;
}
- if (_button)
- *_button = b;
+ if (ret_button)
+ *ret_button = b;
return 0;
}
diff --git a/src/login/logind.h b/src/login/logind.h
index f260f2dc96..5e2dc8cb77 100644
--- a/src/login/logind.h
+++ b/src/login/logind.h
@@ -127,14 +127,14 @@ struct Manager {
void manager_reset_config(Manager *m);
int manager_parse_config_file(Manager *m);
-int manager_add_device(Manager *m, const char *sysfs, bool master, Device **_device);
-int manager_add_button(Manager *m, const char *name, Button **_button);
-int manager_add_seat(Manager *m, const char *id, Seat **_seat);
-int manager_add_session(Manager *m, const char *id, Session **_session);
-int manager_add_user(Manager *m, uid_t uid, gid_t gid, const char *name, const char *home, User **_user);
-int manager_add_user_by_name(Manager *m, const char *name, User **_user);
-int manager_add_user_by_uid(Manager *m, uid_t uid, User **_user);
-int manager_add_inhibitor(Manager *m, const char* id, Inhibitor **_inhibitor);
+int manager_add_device(Manager *m, const char *sysfs, bool master, Device **ret_device);
+int manager_add_button(Manager *m, const char *name, Button **ret_button);
+int manager_add_seat(Manager *m, const char *id, Seat **ret_seat);
+int manager_add_session(Manager *m, const char *id, Session **ret_session);
+int manager_add_user(Manager *m, uid_t uid, gid_t gid, const char *name, const char *home, User **ret_user);
+int manager_add_user_by_name(Manager *m, const char *name, User **ret_user);
+int manager_add_user_by_uid(Manager *m, uid_t uid, User **ret_user);
+int manager_add_inhibitor(Manager *m, const char* id, Inhibitor **ret_inhibitor);
int manager_process_seat_device(Manager *m, sd_device *d);
int manager_process_button_device(Manager *m, sd_device *d);