[git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-9-ged432f0

by Marcus Brinkmann cvs at cvs.gnupg.org
Tue Jan 3 18:33:08 CET 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  ed432f030e604f7b2fd4a79c2110d92b9cde7501 (commit)
       via  ff2095ad7b4be7eaf9468b6ef39fd979527ecc4f (commit)
      from  0dce26778ef8abd4fc40de689d7ec9b720d26430 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ed432f030e604f7b2fd4a79c2110d92b9cde7501
Author: Marcus Brinkmann <marcus.brinkmann at ruhr-uni-bochum.de>
Date:   Tue Jan 3 17:38:24 2012 +0100

    Silence gcc warning.
    
    * sm/call-dirmngr.c (get_cached_cert): Make sure buflen is initialized.

diff --git a/sm/call-dirmngr.c b/sm/call-dirmngr.c
index cdaa9dc..92f7a0e 100644
--- a/sm/call-dirmngr.c
+++ b/sm/call-dirmngr.c
@@ -816,7 +816,7 @@ get_cached_cert (assuan_context_t ctx,
   char hexfpr[2*20+1];
   struct membuf mb;
   char *buf;
-  size_t buflen;
+  size_t buflen = 0;
   ksba_cert_t cert;
 
   *r_cert = NULL;

commit ff2095ad7b4be7eaf9468b6ef39fd979527ecc4f
Author: Marcus Brinkmann <marcus.brinkmann at ruhr-uni-bochum.de>
Date:   Tue Jan 3 17:32:41 2012 +0100

    Revert last change, add comment about link() return values.
    
    * common/dotlock.c (use_hardlinks_p, dotlock_take_unix): Do not check
    return value of link().

diff --git a/common/dotlock.c b/common/dotlock.c
index 58a3d0f..5e17e64 100644
--- a/common/dotlock.c
+++ b/common/dotlock.c
@@ -583,21 +583,17 @@ use_hardlinks_p (const char *tname)
   strcpy (lname, tname);
   strcat (lname, "x");
 
-  res = link (tname, lname);
-  if (res < 0)
-    res = -1;
-  else
-    {
-      if (stat (tname, &sb))
-	res = -1;  /* Ooops.  */
-      else if (sb.st_nlink == nlink + 1)
-	res = 0;   /* Yeah, hardlinks are supported.  */
-      else
-	res = 1;   /* No hardlink support.  */
+  /* We ignore the return value of link() because it is unreliable.  */
+  (void) link (tname, lname);
 
-      unlink (lname);
-    }
+  if (stat (tname, &sb))
+    res = -1;  /* Ooops.  */
+  else if (sb.st_nlink == nlink + 1)
+    res = 0;   /* Yeah, hardlinks are supported.  */
+  else
+    res = 1;   /* No hardlink support.  */
 
+  unlink (lname);
   jnlib_free (lname);
   return res;
 }
@@ -953,7 +949,6 @@ dotlock_destroy (dotlock_t h)
 static int
 dotlock_take_unix (dotlock_t h, long timeout)
 {
-  int res;
   int wtime = 0;
   int sumtime = 0;
   int pid;
@@ -1010,13 +1005,8 @@ dotlock_take_unix (dotlock_t h, long timeout)
     {
       struct stat sb;
 
-      res = link (h->tname, h->lockname);
-      if (res < 0)
-	{
-          my_error_1 ("lock not made: Oops: link of tmp file failed: %s\n",
-                      strerror (errno));
-	  return -1;
-	}
+      /* We ignore the return value of link() because it is unreliable.  */
+      (void) link (h->tname, h->lockname);
 
       if (stat (h->tname, &sb))
         {

-----------------------------------------------------------------------

Summary of changes:
 common/dotlock.c  |   32 +++++++++++---------------------
 sm/call-dirmngr.c |    2 +-
 2 files changed, 12 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list