summaryrefslogtreecommitdiffstats
path: root/src/basic
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-07-11 10:50:51 +0200
committerLennart Poettering <lennart@poettering.net>2024-07-19 11:44:04 +0200
commitac508b1173ae6cec95ccb3984a6f0c2dbc02ea98 (patch)
tree85752add4be3f218f9f0e3e3894e185bd2334165 /src/basic
parentterminal-util: modernize vt_reset_keyboard() a bit (diff)
downloadsystemd-ac508b1173ae6cec95ccb3984a6f0c2dbc02ea98.tar.xz
systemd-ac508b1173ae6cec95ccb3984a6f0c2dbc02ea98.zip
terminal-util: rename return parameters ret_xyz
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/terminal-util.c10
-rw-r--r--src/basic/terminal-util.h8
2 files changed, 9 insertions, 9 deletions
diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c
index c1f463a39b..14556fa040 100644
--- a/src/basic/terminal-util.c
+++ b/src/basic/terminal-util.c
@@ -1059,11 +1059,11 @@ int getttyname_harder(int fd, char **ret) {
return 0;
}
-int get_ctty_devnr(pid_t pid, dev_t *d) {
- int r;
+int get_ctty_devnr(pid_t pid, dev_t *ret) {
_cleanup_free_ char *line = NULL;
- const char *p;
unsigned long ttynr;
+ const char *p;
+ int r;
assert(pid >= 0);
@@ -1090,8 +1090,8 @@ int get_ctty_devnr(pid_t pid, dev_t *d) {
if (devnum_is_zero(ttynr))
return -ENXIO;
- if (d)
- *d = (dev_t) ttynr;
+ if (ret)
+ *ret = (dev_t) ttynr;
return 0;
}
diff --git a/src/basic/terminal-util.h b/src/basic/terminal-util.h
index 8b55ade765..86bbcd7af5 100644
--- a/src/basic/terminal-util.h
+++ b/src/basic/terminal-util.h
@@ -265,11 +265,11 @@ DEFINE_ANSI_FUNC_UNDERLINE(highlight_blue_underline, HIGHLIGHT_BLUE);
DEFINE_ANSI_FUNC_UNDERLINE(highlight_magenta_underline, HIGHLIGHT_MAGENTA);
DEFINE_ANSI_FUNC_UNDERLINE_256(highlight_grey_underline, HIGHLIGHT_GREY, HIGHLIGHT_GREY_FALLBACK);
-int get_ctty_devnr(pid_t pid, dev_t *d);
-int get_ctty(pid_t, dev_t *_devnr, char **r);
+int get_ctty_devnr(pid_t pid, dev_t *ret);
+int get_ctty(pid_t, dev_t *ret_devnr, char **ret);
-int getttyname_malloc(int fd, char **r);
-int getttyname_harder(int fd, char **r);
+int getttyname_malloc(int fd, char **ret);
+int getttyname_harder(int fd, char **ret);
int ptsname_malloc(int fd, char **ret);