]> git.ipfire.org Git - thirdparty/git.git/blobdiff - gpg-interface.c
coverity: allow running on macOS
[thirdparty/git.git] / gpg-interface.c
index 19a3471a0b55a5b5f92d0756cd4c1419d2b2e344..48f43c5a21d34569bdc966eefd652da38003d157 100644 (file)
 #include "sigchain.h"
 #include "tempfile.h"
 #include "alias.h"
-#include "wrapper.h"
+#include "environment.h"
 
-static int git_gpg_config(const char *, const char *, void *);
+static int git_gpg_config(const char *, const char *,
+                         const struct config_context *, void *);
 
 static void gpg_interface_lazy_init(void)
 {
@@ -586,8 +587,8 @@ static int verify_ssh_signed_buffer(struct signature_check *sigc,
                }
        }
 
-       strbuf_stripspace(&ssh_keygen_out, 0);
-       strbuf_stripspace(&ssh_keygen_err, 0);
+       strbuf_stripspace(&ssh_keygen_out, '\0');
+       strbuf_stripspace(&ssh_keygen_err, '\0');
        /* Add stderr outputs to show the user actual ssh-keygen errors */
        strbuf_add(&ssh_keygen_out, ssh_principals_err.buf, ssh_principals_err.len);
        strbuf_add(&ssh_keygen_out, ssh_keygen_err.buf, ssh_keygen_err.len);
@@ -720,7 +721,9 @@ void set_signing_key(const char *key)
        configured_signing_key = xstrdup(key);
 }
 
-static int git_gpg_config(const char *var, const char *value, void *cb UNUSED)
+static int git_gpg_config(const char *var, const char *value,
+                         const struct config_context *ctx UNUSED,
+                         void *cb UNUSED)
 {
        struct gpg_format *fmt = NULL;
        char *fmtname = NULL;