diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-05-28 16:03:26 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-05-31 23:47:48 +0200 |
commit | 24b0c6c2c9e0cf10e97aaa9b1bda7398857cd0fc (patch) | |
tree | ac2a40661699bf6c9c0706821ef38b5630a76078 /src | |
parent | elf-util: rename stack_context_destroy() -> stack_context_done() (diff) | |
download | systemd-24b0c6c2c9e0cf10e97aaa9b1bda7398857cd0fc.tar.xz systemd-24b0c6c2c9e0cf10e97aaa9b1bda7398857cd0fc.zip |
calendarspec: rename arguments
Diffstat (limited to '')
-rw-r--r-- | src/shared/calendarspec.c | 12 | ||||
-rw-r--r-- | src/shared/calendarspec.h | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/shared/calendarspec.c b/src/shared/calendarspec.c index fa19e4c95a..9e43a4689e 100644 --- a/src/shared/calendarspec.c +++ b/src/shared/calendarspec.c @@ -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; } diff --git a/src/shared/calendarspec.h b/src/shared/calendarspec.h index 5a04ac018d..60c1c79267 100644 --- a/src/shared/calendarspec.h +++ b/src/shared/calendarspec.h @@ -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); |