1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-11 20:58:27 +03:00

ptyfwd: coding style fix

- replace 'type *func()' -> 'type* func()',
- rename output argument to 'ret'.
This commit is contained in:
Yu Watanabe 2024-12-17 15:37:10 +09:00
parent 4c9f242a54
commit 781c8c3f72
2 changed files with 8 additions and 8 deletions

View File

@ -243,7 +243,7 @@ static bool drained(PTYForward *f) {
return true;
}
static char *background_color_sequence(PTYForward *f) {
static char* background_color_sequence(PTYForward *f) {
assert(f);
assert(f->background_color);
@ -960,7 +960,7 @@ int pty_forward_new(
return 0;
}
PTYForward *pty_forward_free(PTYForward *f) {
PTYForward* pty_forward_free(PTYForward *f) {
if (!f)
return NULL;
@ -972,14 +972,14 @@ PTYForward *pty_forward_free(PTYForward *f) {
return mfree(f);
}
int pty_forward_get_last_char(PTYForward *f, char *ch) {
int pty_forward_get_last_char(PTYForward *f, char *ret) {
assert(f);
assert(ch);
assert(ret);
if (!f->last_char_set)
return -ENXIO;
*ch = f->last_char;
*ret = f->last_char;
return 0;
}

View File

@ -25,10 +25,10 @@ typedef enum PTYForwardFlags {
typedef int (*PTYForwardHandler)(PTYForward *f, int rcode, void *userdata);
int pty_forward_new(sd_event *event, int master, PTYForwardFlags flags, PTYForward **f);
PTYForward *pty_forward_free(PTYForward *f);
int pty_forward_new(sd_event *event, int master, PTYForwardFlags flags, PTYForward **ret);
PTYForward* pty_forward_free(PTYForward *f);
int pty_forward_get_last_char(PTYForward *f, char *ch);
int pty_forward_get_last_char(PTYForward *f, char *ret);
int pty_forward_set_ignore_vhangup(PTYForward *f, bool ignore_vhangup);
bool pty_forward_get_ignore_vhangup(PTYForward *f);