calendarspec: rename arguments

This commit is contained in:
Yu Watanabe
2023-06-01 06:47:48 +09:00
parent a694747d45
commit 24b0c6c2c9
2 changed files with 8 additions and 8 deletions
+6 -6
View 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;
}
+2 -2
View 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);