]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
coverity: Add some additional check for strequal()
authorAndreas Schneider <asn@samba.org>
Tue, 29 Jul 2025 12:44:50 +0000 (14:44 +0200)
committerAnoop C S <anoopcs@samba.org>
Tue, 5 Aug 2025 07:09:04 +0000 (07:09 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Tue Aug  5 07:09:04 UTC 2025 on atb-devel-224

coverity/coverity_assert_model.c

index d1eb26519c4dfa7c7adc39caaae83729e7a3f05d..a14df9c2c1cdba5a486f75cbc9eb62bb5d916a18 100644 (file)
@@ -20,6 +20,9 @@
 
 #define LargestIntegralType unsigned long long
 #define NULL (void *)0
+#define bool unsigned int
+#define true 1
+#define false 0
 /* size_t is already defined by Coverity */
 
 void _assert_true(const LargestIntegralType result,
@@ -106,3 +109,18 @@ void _assert_not_in_set(
 {
       __coverity_panic__();
 }
+
+/***********************************************************
+ * SAMBA
+ ***********************************************************/
+
+/* ./lib/util */
+
+bool strequal(const char *a, const char *b)
+{
+       /* Require NUL-terminated arguments */
+       __coverity_string_null_sink__(a);
+       __coverity_string_null_sink__(b);
+
+       return true;
+}