[glib] glocalfileinfo: remove non-use of GTimeVal
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] glocalfileinfo: remove non-use of GTimeVal
- Date: Wed, 3 Nov 2010 02:40:13 +0000 (UTC)
commit d22681feb44daa0209cf55c8e45cc8f0c13d4ded
Author: Ryan Lortie <desrt desrt ca>
Date: Mon Nov 1 17:04:31 2010 -0400
glocalfileinfo: remove non-use of GTimeVal
gio/glocalfileinfo.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index 08eb542..30ea97b 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -119,18 +119,18 @@ static GHashTable *gid_cache = NULL;
char *
_g_local_file_info_create_etag (GLocalFileStat *statbuf)
{
- GTimeVal tv;
-
- tv.tv_sec = statbuf->st_mtime;
+ glong sec, usec;
+
+ sec = statbuf->st_mtime;
#if defined (HAVE_STRUCT_STAT_ST_MTIMENSEC)
- tv.tv_usec = statbuf->st_mtimensec / 1000;
+ usec = statbuf->st_mtimensec / 1000;
#elif defined (HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC)
- tv.tv_usec = statbuf->st_mtim.tv_nsec / 1000;
+ usec = statbuf->st_mtim.tv_nsec / 1000;
#else
- tv.tv_usec = 0;
+ usec = 0;
#endif
- return g_strdup_printf ("%lu:%lu", tv.tv_sec, tv.tv_usec);
+ return g_strdup_printf ("%lu:%lu", sec, usec);
}
static char *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]