gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: -coverity finding fixes


From: gnunet
Subject: [gnunet] branch master updated: -coverity finding fixes
Date: Sat, 01 Jul 2023 21:50:14 +0200

This is an automated email from the git hooks/post-receive script.

oec pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 798c82098 -coverity finding fixes
798c82098 is described below

commit 798c82098bad425ccf90a405c2952be6d88ed097
Author: Özgür Kesim <oec-taler@kesim.org>
AuthorDate: Sat Jul 1 21:50:09 2023 +0200

    -coverity finding fixes
---
 src/pq/pq_result_helper.c | 9 +++++----
 src/pq/test_pq.c          | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c
index 624263812..5f6215fc1 100644
--- a/src/pq/pq_result_helper.c
+++ b/src/pq/pq_result_helper.c
@@ -21,9 +21,10 @@
  * @file pq/pq_result_helper.c
  * @brief functions to extract result values
  * @author Christian Grothoff
+ * @author Özgür Kesim
  */
-#include "gnunet_time_lib.h"
 #include "platform.h"
+#include "gnunet_time_lib.h"
 #include "gnunet_common.h"
 #include "gnunet_util_lib.h"
 #include "gnunet_pq_lib.h"
@@ -1208,7 +1209,7 @@ extract_array_generic (
     header.lbound = ntohl (h->lbound);
 
     FAIL_IF (1 != header.ndim);
-    FAIL_IF ((0 > header.dim) || (INT_MAX == header.dim));
+    FAIL_IF (INT_MAX <= header.dim);
     FAIL_IF (0 != header.has_null);
     FAIL_IF (1 != header.lbound);
     FAIL_IF (info->oid != header.oid);
@@ -1372,8 +1373,8 @@ extract_array_generic (
         if (NULL != dst_size)
           *dst_size = total;
 
-        if (0 < total)
-          out = GNUNET_malloc (total);
+        FAIL_IF (0 == total);
+        out = GNUNET_malloc (total);
 
         *((void **) dst) = out;
 
diff --git a/src/pq/test_pq.c b/src/pq/test_pq.c
index 7188b9b8e..69c986b6e 100644
--- a/src/pq/test_pq.c
+++ b/src/pq/test_pq.c
@@ -22,10 +22,10 @@
  * @brief Tests for Postgres convenience API
  * @author Christian Grothoff <christian@grothoff.org>
  */
+#include "platform.h"
 #include "gnunet_common.h"
 #include "gnunet_pq_lib.h"
 #include "gnunet_time_lib.h"
-#include "platform.h"
 #include "pq.h"
 
 /**

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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