fp-print: Use g_date_copy

As per previous commit we depend on glib 2.56, we can use this utility
function as well.
This commit is contained in:
Marco Trevisan (Treviño) 2019-11-22 14:19:10 +01:00
parent 8b270141f3
commit 201b5a9614

View file

@ -534,11 +534,8 @@ fp_print_set_enroll_date (FpPrint *print,
g_clear_pointer (&print->enroll_date, g_date_free);
if (enroll_date)
{
/* XXX: Should use g_date_copy, but that is new in 2.56. */
print->enroll_date = g_date_new ();
*print->enroll_date = *enroll_date;
}
print->enroll_date = g_date_copy (enroll_date);
g_object_notify_by_pspec (G_OBJECT (print), properties[PROP_ENROLL_DATE]);
}