]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ptyfwd: coding style fix
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 17 Dec 2024 06:37:10 +0000 (15:37 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 18 Dec 2024 10:45:46 +0000 (19:45 +0900)
- replace 'type *func()' -> 'type* func()',
- rename output argument to 'ret'.

src/shared/ptyfwd.c
src/shared/ptyfwd.h

index 00450ca69679791adc6a0fdc7aa2a954c2aec684..86ebb497ddaa4b4bbd83af0540cc65a614466822 100644 (file)
@@ -243,7 +243,7 @@ static bool drained(PTYForward *f) {
         return true;
 }
 
-static char *background_color_sequence(PTYForward *f) {
+static charbackground_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) {
+PTYForwardpty_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;
 }
 
index b86027e9bc5171d025efb351bd0b64c2b921c8d6..ad020a7ced01edd2fd9ba3698b1245aa5e240534 100644 (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);
+PTYForwardpty_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);