diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-03-08 15:42:47 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-03-08 15:42:47 +0100 |
commit | ac2ec01a3db21f8d9a567ed6438f4840db2c309f (patch) | |
tree | f185cc3a1d5dbf43fe7e327212f446c666238c99 /lib/verify-tofu.c | |
parent | 1fa62995b4950a974b815fcd0a9a6da14648e5df (diff) | |
download | gnutls-ac2ec01a3db21f8d9a567ed6438f4840db2c309f.tar.gz |
clang warning fixes
Diffstat (limited to 'lib/verify-tofu.c')
-rw-r--r-- | lib/verify-tofu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/verify-tofu.c b/lib/verify-tofu.c index e640a72031..28b1090fd3 100644 --- a/lib/verify-tofu.c +++ b/lib/verify-tofu.c @@ -172,7 +172,7 @@ static int parse_commitment_line(char *line, if (p == NULL) return gnutls_assert_val(GNUTLS_E_PARSING_ERROR); - if (p[0] != '*' && strcmp(p, host) != 0) + if (p[0] != '*' && host != NULL && strcmp(p, host) != 0) return gnutls_assert_val(GNUTLS_E_PARSING_ERROR); /* read service */ @@ -180,7 +180,7 @@ static int parse_commitment_line(char *line, if (p == NULL) return gnutls_assert_val(GNUTLS_E_PARSING_ERROR); - if (p[0] != '*' && strcmp(p, service) != 0) + if (p[0] != '*' && service != NULL && strcmp(p, service) != 0) return gnutls_assert_val(GNUTLS_E_PARSING_ERROR); /* read expiration */ @@ -268,7 +268,7 @@ static int parse_line(char *line, if (p == NULL) return gnutls_assert_val(GNUTLS_E_PARSING_ERROR); - if (p[0] != '*' && strcmp(p, host) != 0) + if (p[0] != '*' && host != NULL && strcmp(p, host) != 0) return gnutls_assert_val(GNUTLS_E_PARSING_ERROR); /* read service */ @@ -276,7 +276,7 @@ static int parse_line(char *line, if (p == NULL) return gnutls_assert_val(GNUTLS_E_PARSING_ERROR); - if (p[0] != '*' && strcmp(p, service) != 0) + if (p[0] != '*' && service != NULL && strcmp(p, service) != 0) return gnutls_assert_val(GNUTLS_E_PARSING_ERROR); /* read expiration */ |