Fix a couple of bugs pointed out by clang compiler warnings.

* src/engine-gpgconf.c (gpgconf_config_dir_cb): Fix cast.
* src/key.c (_gpgme_key_add_sig): Fix pointer reference.

Signed-off-by: Marcus Brinkmann <mb@g10code.com>
This commit is contained in:
Marcus Brinkmann 2017-08-23 15:38:11 +02:00
parent 57c1259308
commit bfb3a01a0c
2 changed files with 2 additions and 2 deletions

View File

@ -996,7 +996,7 @@ static gpgme_error_t
gpgconf_config_dir_cb (void *hook, char *line) gpgconf_config_dir_cb (void *hook, char *line)
{ {
/* This is an input- and output-parameter. */ /* This is an input- and output-parameter. */
struct gpgconf_config_dir_s *data = (char **) hook; struct gpgconf_config_dir_s *data = (struct gpgconf_config_dir_s *) hook;
int len = strlen(data->what); int len = strlen(data->what);
if (!strncmp(line, data->what, len) && line[len] == ':') if (!strncmp(line, data->what, len) && line[len] == ':')

View File

@ -292,7 +292,7 @@ _gpgme_key_add_sig (gpgme_key_t key, char *src)
&sig->comment, dst); &sig->comment, dst);
} }
else else
sig->uid = '\0'; sig->uid[0] = '\0';
if (!uid->signatures) if (!uid->signatures)
uid->signatures = sig; uid->signatures = sig;