mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-08 02:16:17 +01:00
Merge branch 'null_arg_handling' into 'main'
Add handling of NULL time_t* pointer as argument See merge request GNOME/glib!2523
This commit is contained in:
commit
b615afc0fa
@ -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