shishi-commit
[Top][All Lists]
Advanced

[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:51:27 +0100

Update of /home/cvs/shishi/lib
In directory dopio:/tmp/cvs-serv26772

Modified Files:
        encapreppart.c priv.c 
Log Message:
Fix gettimeofday() usage.

--- /home/cvs/shishi/lib/encapreppart.c 2006/02/07 12:50:17     1.42
+++ /home/cvs/shishi/lib/encapreppart.c 2006/02/07 12:51:27     1.43
@@ -43,7 +43,7 @@
   uint32_t seqnr;
 
   res = gettimeofday (&tv, NULL);
-  if (res)
+  if (res != 0)
     return NULL;
 
   node = shishi_asn1_encapreppart (handle);
--- /home/cvs/shishi/lib/priv.c 2005/05/26 15:12:35     1.11
+++ /home/cvs/shishi/lib/priv.c 2006/02/07 12:51:27     1.12
@@ -1,5 +1,5 @@
 /* priv.c --- Application data privacy protection.
- * Copyright (C) 2002, 2003, 2004  Simon Josefsson
+ * Copyright (C) 2002, 2003, 2004, 2006  Simon Josefsson
  *
  * This file is part of Shishi.
  *
@@ -47,7 +47,6 @@
 {
   Shishi_priv *lpriv;
   struct timeval tv;
-  struct timezone tz;
   char *usec;
   int rc;
 
@@ -84,7 +83,9 @@
   if (rc != SHISHI_OK)
     return rc;
 
-  gettimeofday (&tv, &tz);
+  rc = gettimeofday (&tv, NULL);
+  if (rc != 0)
+    return SHISHI_GETTIMEOFDAY_ERROR;
   asprintf (&usec, "%ld", tv.tv_usec % 1000000);
   rc = shishi_asn1_write (handle, lpriv->encprivpart, "usec", usec, 0);
   free (usec);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]