[git] GPG-ERROR - branch, master, updated. libgpg-error-1.20-10-gee05684

by Justus Winter cvs at cvs.gnupg.org
Thu Nov 19 11:40:38 CET 2015


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 "Error codes used by GnuPG et al.".

The branch, master has been updated
       via  ee0568476506e54349a38d4bb34bba5635097279 (commit)
       via  06af687beaa1f8e72a05bd3a057b73fecb158c3d (commit)
      from  a144fa8863846dc3f6d34731741cd63251620837 (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 ee0568476506e54349a38d4bb34bba5635097279
Author: Justus Winter <justus at g10code.com>
Date:   Thu Nov 19 11:29:33 2015 +0100

    Fix typos found by codespell.
    
    --
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/src/estream.c b/src/estream.c
index 1c3e772..3a89868 100644
--- a/src/estream.c
+++ b/src/estream.c
@@ -190,7 +190,7 @@ struct _gpgrt_stream_internal
   gpgrt_cookie_close_function_t func_close;
   cookie_ioctl_function_t func_ioctl;
   int strategy;
-  es_syshd_t syshd;              /* A copy of the sytem handle.  */
+  es_syshd_t syshd;              /* A copy of the system handle.  */
   struct
   {
     unsigned int err: 1;
@@ -587,7 +587,7 @@ typedef struct estream_cookie_mem
    supplied buffer with the initial conetnt of the memory buffer.  If
    DATA is NULL, DATA_N and DATA_LEN need to be 0 as well.  If DATA is
    not NULL, DATA_N gives the allocated size of DATA and DATA_LEN the
-   used length in DATA.  If this fucntion succeeds DATA is now owned
+   used length in DATA.  If this function succeeds DATA is now owned
    by this function.  If GROW is false FUNC_REALLOC is not
    required. */
 static int
@@ -2965,7 +2965,7 @@ _gpgrt_fopenmem (size_t memlimit, const char *_GPGRT__RESTRICT mode)
 
 

 /* This is the same as es_fopenmem but intializes the memory with a
-   copy of (DATA,DATALEN).  The stream is initally set to the
+   copy of (DATA,DATALEN).  The stream is initially set to the
    beginning.  If MEMLIMIT is not 0 but shorter than DATALEN it
    DATALEN will be used as the value for MEMLIMIT.  */
 estream_t
diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in
index 61b57fc..28581e0 100644
--- a/src/gpg-error.h.in
+++ b/src/gpg-error.h.in
@@ -119,7 +119,7 @@ typedef enum
 
 /* We would really like to use bit-fields in a struct, but using
    structs as return values can cause binary compatibility issues, in
-   particular if you want to do it effeciently (also see
+   particular if you want to do it efficiently (also see
    -freg-struct-return option to GCC).  */
 typedef unsigned int gpg_error_t;
 
@@ -501,7 +501,7 @@ enum gpgrt_syshd_types
     GPGRT_SYSHD_NONE = 0,  /* No system handle available.                   */
     GPGRT_SYSHD_FD = 1,    /* A file descriptor as returned by open().      */
     GPGRT_SYSHD_SOCK = 2,  /* A socket as returned by socket().             */
-    GPGRT_SYSHD_RVID = 3,  /* A rendevous id (see libassuan's gpgcedev.c).  */
+    GPGRT_SYSHD_RVID = 3,  /* A rendezvous id (see libassuan's gpgcedev.c).  */
     GPGRT_SYSHD_HANDLE = 4 /* A HANDLE object (Windows).                    */
   };
 
diff --git a/src/w32-gettext.c b/src/w32-gettext.c
index 89f505d..2eb0289 100644
--- a/src/w32-gettext.c
+++ b/src/w32-gettext.c
@@ -108,7 +108,7 @@ MyCreateFileA (LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwSharedMode,
 
 /* Written by Ulrich Drepper <drepper at gnu.org>, 1995.  */
 /* Win32 code written by Tor Lillqvist <tml at iki.fi>.  */
-/* Renamed _nl_locale_name, removed unsed args, removed include files,
+/* Renamed _nl_locale_name, removed unused args, removed include files,
    non-W32 code and changed comments <wk at gnupg.org>.  */
 
 /* Mingw headers don't have latest language and sublanguage codes.  */
diff --git a/tests/t-lock.c b/tests/t-lock.c
index 831e224..1ccf815 100644
--- a/tests/t-lock.c
+++ b/tests/t-lock.c
@@ -81,7 +81,7 @@ init_accounts (void)
 }
 
 
-/* Check that the sum of all accounts matches the intial sum.  */
+/* Check that the sum of all accounts matches the initial sum.  */
 static void
 check_accounts (void)
 {
@@ -114,7 +114,7 @@ get_rand (int high)
 }
 
 
-/* Pick a random account.  Note that this fucntion is not
+/* Pick a random account.  Note that this function is not
    thread-safe. */
 static int
 pick_account (void)

commit 06af687beaa1f8e72a05bd3a057b73fecb158c3d
Author: Justus Winter <justus at g10code.com>
Date:   Thu Nov 19 11:21:21 2015 +0100

    Avoid 'malloc' corner case.
    
    * src/init.c (_gpgrt_realloc): Avoid calling 'malloc(0)'.
    --
    Previously, if '_gpgrt_realloc' was called with both A and N being
    zero, malloc is invoked with a size of zero.  This happens e.g. when
    calling '_gpgrt_free' with a NULL pointer, which is supposed to be a
    no-op.
    
    Found using the Clang Static Analyzer.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/src/init.c b/src/init.c
index e84b234..7abb6ff 100644
--- a/src/init.c
+++ b/src/init.c
@@ -171,15 +171,15 @@ _gpgrt_realloc (void *a, size_t n)
   if (custom_realloc)
     return custom_realloc (a, n);
 
-  if (!a)
-    return malloc (n);
-
   if (!n)
     {
       free (a);
       return NULL;
     }
 
+  if (!a)
+    return malloc (n);
+
   return realloc (a, n);
 }
 

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

Summary of changes:
 src/estream.c      | 6 +++---
 src/gpg-error.h.in | 4 ++--
 src/init.c         | 6 +++---
 src/w32-gettext.c  | 2 +-
 tests/t-lock.c     | 4 ++--
 5 files changed, 11 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
Error codes used by GnuPG et al.
http://git.gnupg.org




More information about the Gnupg-commits mailing list