[git] KSBA - branch, master, updated. libksba-1.3.4-10-g68fba3d

by Werner Koch cvs at cvs.gnupg.org
Mon Aug 22 11:50:44 CEST 2016


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 "KSBA is a library to access X.509 certificates and CMS data.".

The branch, master has been updated
       via  68fba3d8d7757b7f7ed75fdebd2b91299943503b (commit)
      from  89d898346b75337ec2546c672ea720c5c956b53a (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 68fba3d8d7757b7f7ed75fdebd2b91299943503b
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Aug 22 11:47:28 2016 +0200

    Use size_t for the result of fread.
    
    * src/reader.c (ksba_reader_read): Make 'n' and size_t.
    --
    
    GnuPG-bug-id: 2415
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/src/reader.c b/src/reader.c
index 0f8bad5..c59978d 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -366,7 +366,7 @@ ksba_reader_read (ksba_reader_t r, char *buffer, size_t length, size_t *nread)
     }
   else if (r->type == READER_TYPE_FILE)
     {
-      int n;
+      size_t n;
 
       if (r->eof)
         return gpg_error (GPG_ERR_EOF);
@@ -378,7 +378,7 @@ ksba_reader_read (ksba_reader_t r, char *buffer, size_t length, size_t *nread)
         }
 
       n = fread (buffer, 1, length, r->u.file);
-      if (n > 0)
+      if (n)
         {
           r->nread += n;
           *nread = n;
@@ -388,9 +388,9 @@ ksba_reader_read (ksba_reader_t r, char *buffer, size_t length, size_t *nread)
       if (n < length)
         {
           if (ferror(r->u.file))
-              r->error = errno;
+            r->error = errno;
           r->eof = 1;
-          if (n <= 0)
+          if (!n)
             return gpg_error (GPG_ERR_EOF);
         }
     }

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

Summary of changes:
 src/reader.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
KSBA is a library to access X.509 certificates and CMS data.
http://git.gnupg.org




More information about the Gnupg-commits mailing list