[gnome-keyring] buffer_get_time: use time_t as last argument
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] buffer_get_time: use time_t as last argument
- Date: Thu, 10 Oct 2013 15:18:35 +0000 (UTC)
commit 0a82e3357c9fd17479d2a614dc64594b3349d138
Author: Antoine Jacoutot <ajacoutot gnome org>
Date: Tue Aug 20 16:50:03 2013 +0200
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
pkcs11/secret-store/gkm-secret-binary.c | 2 +-
pkcs11/secret-store/tests/dump-keyring0-format.c | 2 +-
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 92ba8ca..a4ee19c 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 5443943..a459cd3 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]