mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Add handling of NULL time_t* pointer as argument
This commit is contained in:
parent
199261a419
commit
0a6d815f95
@ -294,7 +294,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
void
|
||||
g_time_val_add (GTimeVal *time_, glong microseconds)
|
||||
{
|
||||
g_return_if_fail (time_->tv_usec >= 0 && time_->tv_usec < G_USEC_PER_SEC);
|
||||
g_return_if_fail (time_ != NULL &&
|
||||
time_->tv_usec >= 0 &&
|
||||
time_->tv_usec < G_USEC_PER_SEC);
|
||||
|
||||
if (microseconds >= 0)
|
||||
{
|
||||
@ -603,7 +605,9 @@ g_time_val_to_iso8601 (GTimeVal *time_)
|
||||
#endif
|
||||
time_t secs;
|
||||
|
||||
g_return_val_if_fail (time_->tv_usec >= 0 && time_->tv_usec < G_USEC_PER_SEC, NULL);
|
||||
g_return_val_if_fail (time_ != NULL &&
|
||||
time_->tv_usec >= 0 &&
|
||||
time_->tv_usec < G_USEC_PER_SEC, NULL);
|
||||
|
||||
secs = time_->tv_sec;
|
||||
#ifdef _WIN32
|
||||
|
Loading…
Reference in New Issue
Block a user