summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@gnome.org>2013-08-20 16:50:03 +0200
committerStef Walter <stefw@gnome.org>2013-10-10 17:09:35 +0200
commit0a82e3357c9fd17479d2a614dc64594b3349d138 (patch)
treeb649e36e43e835aa8ce447a6af79894dbbcd4379
parentfa8a3f8ce52483345d540c0bdda0ed099fb8e137 (diff)
buffer_get_time: use time_t as last argument
ctime and mtime are time_t values. However, buffer_get_time() takes glong as its last argument. This is problematic because depending on the operating system and arch, time_t can be different. For e.g. on OpenBSD it is both long long for 32-bit and 64-bit architectures while on Linux, it is long for 32-bit. https://bugzilla.gnome.org/show_bug.cgi?id=706405
-rw-r--r--pkcs11/secret-store/gkm-secret-binary.c2
-rw-r--r--pkcs11/secret-store/tests/dump-keyring0-format.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/pkcs11/secret-store/gkm-secret-binary.c b/pkcs11/secret-store/gkm-secret-binary.c
index 92ba8ca5..a4ee19c5 100644
--- a/pkcs11/secret-store/gkm-secret-binary.c
+++ b/pkcs11/secret-store/gkm-secret-binary.c
@@ -106,7 +106,7 @@ buffer_add_time (EggBuffer *buffer, glong time)
}
static gboolean
-buffer_get_time (EggBuffer *buffer, gsize offset, gsize *next_offset, glong *time)
+buffer_get_time (EggBuffer *buffer, gsize offset, gsize *next_offset, time_t *time)
{
guint32 a, b;
guint64 val;
diff --git a/pkcs11/secret-store/tests/dump-keyring0-format.c b/pkcs11/secret-store/tests/dump-keyring0-format.c
index 54439438..a459cd33 100644
--- a/pkcs11/secret-store/tests/dump-keyring0-format.c
+++ b/pkcs11/secret-store/tests/dump-keyring0-format.c
@@ -181,7 +181,7 @@ static gboolean
buffer_get_time (Buffer *buffer,
gsize offset,
gsize *next_offset,
- glong *time)
+ time_t *time)
{
guint32 a, b;
guint64 val;