[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS shishi/lib
From: |
shishi-commit |
Subject: |
CVS shishi/lib |
Date: |
Tue, 7 Feb 2006 13:48:57 +0100 |
Update of /home/cvs/shishi/lib
In directory dopio:/tmp/cvs-serv26713
Modified Files:
safe.c
Log Message:
Fix gettimeofday usage.
--- /home/cvs/shishi/lib/safe.c 2005/05/26 15:12:35 1.33
+++ /home/cvs/shishi/lib/safe.c 2006/02/07 12:48:57 1.34
@@ -1,5 +1,5 @@
/* safe.c --- Application data integrity protection.
- * Copyright (C) 2002, 2003, 2004 Simon Josefsson
+ * Copyright (C) 2002, 2003, 2004, 2006 Simon Josefsson
*
* This file is part of Shishi.
*
@@ -46,7 +46,6 @@
{
Shishi_safe *lsafe;
struct timeval tv;
- struct timezone tz;
char *usec;
int rc;
@@ -75,7 +74,10 @@
if (rc != SHISHI_OK)
return rc;
- gettimeofday (&tv, &tz);
+ rc = gettimeofday (&tv, NULL);
+ if (!rc)
+ return SHISHI_GETTIMEOFDAY_ERROR;
+
asprintf (&usec, "%ld", tv.tv_usec % 1000000);
rc = shishi_asn1_write (handle, lsafe->safe, "safe-body.usec", usec, 0);
free (usec);
- CVS shishi/lib, shishi-commit, 2006/02/07
- CVS shishi/lib, shishi-commit, 2006/02/07
- CVS shishi/lib, shishi-commit, 2006/02/07
- CVS shishi/lib, shishi-commit, 2006/02/07
- CVS shishi/lib, shishi-commit, 2006/02/07
- CVS shishi/lib, shishi-commit, 2006/02/07
- CVS shishi/lib,
shishi-commit <=
- CVS shishi/lib, shishi-commit, 2006/02/07
- CVS shishi/lib, shishi-commit, 2006/02/07
- CVS shishi/lib, shishi-commit, 2006/02/07