shared/calendarspec: make output arg optional

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-05-17 09:54:24 +02:00
parent 2cae4711f3
commit 9a2b3d3df1
1 changed files with 2 additions and 2 deletions

View File

@ -862,7 +862,6 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) {
int r;
assert(p);
assert(spec);
c = new(CalendarSpec, 1);
if (!c)
@ -1076,7 +1075,8 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) {
if (!calendar_spec_valid(c))
return -EINVAL;
*spec = TAKE_PTR(c);
if (spec)
*spec = TAKE_PTR(c);
return 0;
}