/** * idmef_time_new_from_time: * @time: Address where to store the created #idmef_time_t object. * @t: Pointer to a time_t. * * Creates a new #idmef_time_t object and store it in @time. * This object will be filled with information available in @t. The created * @time won't contain micro seconds information, since theses are not * available within @t. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_time_new_from_time(idmef_time_t **time, const time_t *t) { int ret; libidmef_return_val_if_fail(t, libidmef_error(LIBIDMEF_ERROR_ASSERTION)); ret = idmef_time_new(time); if ( ret < 0 ) return ret; idmef_time_set_from_time(*time, t); return 0; }
/** * idmef_time_new_from_time: * @time: Address where to store the created #idmef_time_t object. * @t: Pointer to a time_t. * * Creates a new #idmef_time_t object and store it in @time. * This object will be filled with information available in @t. The created * @time won't contain micro seconds information, since theses are not * available within @t. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_time_new_from_time(idmef_time_t **time, const time_t *t) { int ret; prelude_return_val_if_fail(t, prelude_error(PRELUDE_ERROR_ASSERTION)); ret = idmef_time_new(time); if ( ret < 0 ) return ret; idmef_time_set_from_time(*time, t); return 0; }
/** * idmef_time_new_from_time: * @time: Address where to store the created #idmef_time_t object. * @t: Pointer to a time_t. * * Creates a new #idmef_time_t object and store it in @time. * This object will be filled with information available in @t. The created * @time won't contain micro seconds information, since theses are not * available within @t. * * Returns: 0 on success, a negative value if an error occured. */ int idmef_time_new_from_time(idmef_time_t **time, const time_t *t) { int ret; requiem_return_val_if_fail(t, requiem_error(REQUIEM_ERROR_ASSERTION)); ret = idmef_time_new(time); if ( ret < 0 ) return ret; idmef_time_set_from_time(*time, t); return 0; }