summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2014-09-25 19:11:14 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2014-09-25 19:19:03 +0200
commit3c1be41fff0e49a55696c4927478e701418a668f (patch)
tree0028941b8991c07b6e2c296a3cbb615db81af015 /src
parent6db38b92b0274af76f6cfc3f7a14a526a7d8c59a (diff)
downloadgnutls-3c1be41fff0e49a55696c4927478e701418a668f.tar.gz
fixed compilation warnings
Diffstat (limited to 'src')
-rw-r--r--src/certtool.c8
-rw-r--r--src/cli.c24
2 files changed, 16 insertions, 16 deletions
diff --git a/src/certtool.c b/src/certtool.c
index 6061c1faf8..90200beee5 100644
--- a/src/certtool.c
+++ b/src/certtool.c
@@ -2412,15 +2412,15 @@ _verify_x509_mem(const void *cert, int cert_size, const void *ca,
return 0;
}
-static void print_verification_res(FILE * outfile, unsigned int output)
+static void print_verification_res(FILE * out, unsigned int output)
{
gnutls_datum_t pout;
int ret;
if (output) {
- fprintf(outfile, "Not verified.");
+ fprintf(out, "Not verified.");
} else {
- fprintf(outfile, "Verified.");
+ fprintf(out, "Verified.");
}
ret =
@@ -2432,7 +2432,7 @@ static void print_verification_res(FILE * outfile, unsigned int output)
exit(EXIT_FAILURE);
}
- fprintf(outfile, " %s", pout.data);
+ fprintf(out, " %s", pout.data);
gnutls_free(pout.data);
}
diff --git a/src/cli.c b/src/cli.c
index 867c646fcb..9aeab30948 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -604,7 +604,7 @@ cert_callback(gnutls_session_t session,
/* initializes a gnutls_session_t with some defaults.
*/
-static gnutls_session_t init_tls_session(const char *hostname)
+static gnutls_session_t init_tls_session(const char *host)
{
const char *err;
int ret;
@@ -631,9 +631,9 @@ static gnutls_session_t init_tls_session(const char *hostname)
/* allow the use of private ciphersuites.
*/
if (disable_extensions == 0 && disable_sni == 0) {
- if (hostname != NULL && is_ip(hostname) == 0)
+ if (host != NULL && is_ip(host) == 0)
gnutls_server_name_set(session, GNUTLS_NAME_DNS,
- hostname, strlen(hostname));
+ host, strlen(host));
}
if (HAVE_OPT(DH_BITS))
@@ -1520,26 +1520,26 @@ psk_callback(gnutls_session_t session, char **username,
if (HAVE_OPT(PSKUSERNAME))
*username = gnutls_strdup(OPT_ARG(PSKUSERNAME));
else {
- char *tmp = NULL;
+ char *p = NULL;
size_t n;
printf("Enter PSK identity: ");
fflush(stdout);
- getline(&tmp, &n, stdin);
+ getline(&p, &n, stdin);
- if (tmp == NULL) {
+ if (p == NULL) {
fprintf(stderr,
"No username given, aborting...\n");
return GNUTLS_E_INSUFFICIENT_CREDENTIALS;
}
- if (tmp[strlen(tmp) - 1] == '\n')
- tmp[strlen(tmp) - 1] = '\0';
- if (tmp[strlen(tmp) - 1] == '\r')
- tmp[strlen(tmp) - 1] = '\0';
+ if (p[strlen(p) - 1] == '\n')
+ p[strlen(p) - 1] = '\0';
+ if (p[strlen(p) - 1] == '\r')
+ p[strlen(p) - 1] = '\0';
- *username = gnutls_strdup(tmp);
- free(tmp);
+ *username = gnutls_strdup(p);
+ free(p);
}
if (!*username)
return GNUTLS_E_MEMORY_ERROR;