]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
calendarspec: rename arguments
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 28 May 2023 14:03:26 +0000 (23:03 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 31 May 2023 21:47:48 +0000 (06:47 +0900)
src/shared/calendarspec.c
src/shared/calendarspec.h

index fa19e4c95a5e8dcb811fb0421763c644cc9831ec..9e43a4689ebd2351b6327437b6ed82feb085638d 100644 (file)
@@ -336,14 +336,14 @@ static void format_chain(FILE *f, int space, const CalendarComponent *c, bool us
         _format_chain(f, space, c, /* start = */ true, usec);
 }
 
-int calendar_spec_to_string(const CalendarSpec *c, char **p) {
+int calendar_spec_to_string(const CalendarSpec *c, char **ret) {
         _cleanup_free_ char *buf = NULL;
         _cleanup_fclose_ FILE *f = NULL;
         size_t sz = 0;
         int r;
 
         assert(c);
-        assert(p);
+        assert(ret);
 
         f = open_memstream_unlocked(&buf, &sz);
         if (!f)
@@ -392,7 +392,7 @@ int calendar_spec_to_string(const CalendarSpec *c, char **p) {
         if (!buf)
                 return -ENOMEM;
 
-        *p = TAKE_PTR(buf);
+        *ret = TAKE_PTR(buf);
         return 0;
 }
 
@@ -879,7 +879,7 @@ finish:
         return 0;
 }
 
-int calendar_spec_from_string(const char *p, CalendarSpec **spec) {
+int calendar_spec_from_string(const char *p, CalendarSpec **ret) {
         const char *utc;
         _cleanup_(calendar_spec_freep) CalendarSpec *c = NULL;
         _cleanup_free_ char *p_tmp = NULL;
@@ -1099,8 +1099,8 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) {
         if (!calendar_spec_valid(c))
                 return -EINVAL;
 
-        if (spec)
-                *spec = TAKE_PTR(c);
+        if (ret)
+                *ret = TAKE_PTR(c);
         return 0;
 }
 
index 5a04ac018d4269e0d660222b6b01157ae976d225..60c1c792673032dff267e47da7669e26eb0f45d7 100644 (file)
@@ -36,8 +36,8 @@ CalendarSpec* calendar_spec_free(CalendarSpec *c);
 
 bool calendar_spec_valid(CalendarSpec *spec);
 
-int calendar_spec_to_string(const CalendarSpec *spec, char **p);
-int calendar_spec_from_string(const char *p, CalendarSpec **spec);
+int calendar_spec_to_string(const CalendarSpec *spec, char **ret);
+int calendar_spec_from_string(const char *p, CalendarSpec **ret);
 
 int calendar_spec_next_usec(const CalendarSpec *spec, usec_t usec, usec_t *next);