shared/calendarspec: make output arg optional
This commit is contained in:
parent
2cae4711f3
commit
9a2b3d3df1
|
@ -862,7 +862,6 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) {
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
assert(p);
|
assert(p);
|
||||||
assert(spec);
|
|
||||||
|
|
||||||
c = new(CalendarSpec, 1);
|
c = new(CalendarSpec, 1);
|
||||||
if (!c)
|
if (!c)
|
||||||
|
@ -1076,7 +1075,8 @@ int calendar_spec_from_string(const char *p, CalendarSpec **spec) {
|
||||||
if (!calendar_spec_valid(c))
|
if (!calendar_spec_valid(c))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
*spec = TAKE_PTR(c);
|
if (spec)
|
||||||
|
*spec = TAKE_PTR(c);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue