[libgda] Don't show warnings in gda_timestamp_valid()
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Don't show warnings in gda_timestamp_valid()
- Date: Tue, 23 Jul 2013 20:10:06 +0000 (UTC)
commit da029e865bcaeb5b9cc0e0da5841ce4af50e63e8
Author: Vivien Malerba <malerba gnome-db org>
Date: Tue Jul 23 22:09:29 2013 +0200
Don't show warnings in gda_timestamp_valid()
libgda/gda-value.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/libgda/gda-value.c b/libgda/gda-value.c
index f7a1a55..658c9fc 100644
--- a/libgda/gda-value.c
+++ b/libgda/gda-value.c
@@ -1360,18 +1360,10 @@ gda_timestamp_valid (const GdaTimestamp *timestamp)
{
g_return_val_if_fail (timestamp, FALSE);
- GDate *gdate;
-
/* check the date part */
- gdate = g_date_new_dmy ((GDateDay) timestamp->day, (GDateMonth) timestamp->month,
- (GDateYear) timestamp->year);
- if (!gdate)
- return FALSE;
- if (! g_date_valid (gdate)) {
- g_date_free (gdate);
+ if (! g_date_valid_dmy ((GDateDay) timestamp->day, (GDateMonth) timestamp->month,
+ (GDateYear) timestamp->year))
return FALSE;
- }
- g_date_free (gdate);
/* check the time part */
if (timestamp->hour > 24 ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]