Skip to content

e_cal_client_get_timezone_sync() — rework usage

According to the implementation of e_cal_client_get_timezone_sync(a, tzid, zone, d, e):

• If zone is not NULL, the function returns FALSE and does not modify zone.

• If and only if the function sets zone to non-NULL, the return value is TRUE.

Corollary: • Passing unitialized zone, as in e-cal-model.c:get_dtstart(), is wrong. • If the function fails, zone is unchanged, so there is no point to set zone to NULL when the function failed and zone was NULL before calling the function. • If the function returns TRUE, zone is set, so there is no need for a separate variable storing the return value. “if (zone)” serves the same purpose.

Merge request reports