From 7563596fdb7587dfb8708b5eeeb4b97d738ba79d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 24 Jul 2024 11:22:28 +0100 Subject: [PATCH] server/crypto.c: Fix fallback functions used when gnutls is unavailable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The return value was wrong resulting in these errors: crypto.c: In function ‘nbdkit_peer_tls_dn’: crypto.c:945:3: error: return makes pointer from integer without a cast [-Werror] return -1; ^ crypto.c: In function ‘nbdkit_peer_tls_issuer_dn’: crypto.c:953:3: error: return makes pointer from integer without a cast [-Werror] return -1; ^ Fixes: commit a3759199c93300cf9de24a129c4141609dacb047 Fixes: commit bf77f76112e3ffbc9149a54fbeb0a505310f28a2 --- server/crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/crypto.c b/server/crypto.c index abdc4801..fa408c75 100644 --- a/server/crypto.c +++ b/server/crypto.c @@ -942,7 +942,7 @@ nbdkit_peer_tls_dn (void) { nbdkit_error ("%s is not supported on this platform", "nbdkit_peer_tls_dn"); - return -1; + return NULL; } NBDKIT_DLL_PUBLIC char * @@ -950,7 +950,7 @@ nbdkit_peer_tls_issuer_dn (void) { nbdkit_error ("%s is not supported on this platform", "nbdkit_peer_tls_issuer_dn"); - return -1; + return NULL; } #endif /* !HAVE_GNUTLS */ -- 2.43.0