]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
use unsigned types in prototypes
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 24 Sep 2014 08:20:54 +0000 (10:20 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 24 Sep 2014 08:25:00 +0000 (10:25 +0200)
lib/gnutls_x509.c
lib/includes/gnutls/gnutls.h.in
lib/includes/gnutls/openpgp.h
lib/openpgp/gnutls_openpgp.c
tests/openpgp-auth.c
tests/x509cert.c

index 5309f25c844f862826d2d11929ae69041efc283f..1a60974cfd1b5170eecddccbba585cc8b5de31af 100644 (file)
@@ -1163,7 +1163,7 @@ gnutls_certificate_set_x509_key(gnutls_certificate_credentials_t res,
  */
 int
 gnutls_certificate_get_x509_key(gnutls_certificate_credentials_t res,
-                                int index,
+                                unsigned index,
                                 gnutls_x509_privkey_t *key)
 {
        if (index >= res->ncerts) {
@@ -1201,11 +1201,12 @@ gnutls_certificate_get_x509_key(gnutls_certificate_credentials_t res,
  */
 int
 gnutls_certificate_get_x509_crt(gnutls_certificate_credentials_t res,
-                                int index,
+                                unsigned index,
                                 gnutls_x509_crt_t **crt_list,
-                                int *crt_list_size)
+                                unsigned *crt_list_size)
 {
-       int ret, i;
+       int ret;
+       unsigned i;
 
        if (index >= res->ncerts) {
                gnutls_assert();
index a03e1f9d7244d009bab316ba70093ef9c53ce3f0..71b092c1bcf2825a85b05e39b64cf91033fc2e4c 100644 (file)
@@ -1435,12 +1435,12 @@ int gnutls_certificate_set_x509_crl(gnutls_certificate_credentials_t res,
                                    int crl_list_size);
 
 int gnutls_certificate_get_x509_key(gnutls_certificate_credentials_t res,
-                                    int index,
+                                    unsigned index,
                                     gnutls_x509_privkey_t *key);
 int gnutls_certificate_get_x509_crt(gnutls_certificate_credentials_t res,
-                                    int index,
+                                    unsigned index,
                                     gnutls_x509_crt_t **crt_list,
-                                    int *crt_list_size);
+                                    unsigned *crt_list_size);
 
   /* OCSP status request extension, RFC 6066 */
 typedef int (*gnutls_status_request_ocsp_func)
index b7b64ad78864383e14bdaa7bee953d9a6824d4bd..cdd3f809997dd84f4bf8722c1b0e422ff4bf1a03 100644 (file)
@@ -334,13 +334,13 @@ int gnutls_certificate_set_openpgp_key
 
 int
 gnutls_certificate_get_openpgp_key(gnutls_certificate_credentials_t res,
-                                   int index,
+                                   unsigned index,
                                    gnutls_openpgp_privkey_t *key);
 int
 gnutls_certificate_get_openpgp_crt(gnutls_certificate_credentials_t res,
-                                   int index,
+                                   unsigned index,
                                    gnutls_openpgp_crt_t **crt_list,
-                                   int *crt_list_size);
+                                   unsigned *crt_list_size);
 
 int
  gnutls_certificate_set_openpgp_key_file
index bbb101ec8ad9b29bcc5022fa283f537db540686e..d609a55de104c99cc01b6f307359aa74d0ffb5a8 100644 (file)
@@ -191,7 +191,7 @@ gnutls_certificate_set_openpgp_key(gnutls_certificate_credentials_t res,
  */
 int
 gnutls_certificate_get_openpgp_key(gnutls_certificate_credentials_t res,
-                                   int index,
+                                   unsigned index,
                                    gnutls_openpgp_privkey_t *key)
 {
        if (index >= res->ncerts) {
@@ -230,11 +230,12 @@ gnutls_certificate_get_openpgp_key(gnutls_certificate_credentials_t res,
  */
 int
 gnutls_certificate_get_openpgp_crt(gnutls_certificate_credentials_t res,
-                                   int index,
+                                   unsigned index,
                                    gnutls_openpgp_crt_t **crt_list,
-                                   int *crt_list_size)
+                                   unsigned *crt_list_size)
 {
-       int ret, i;
+       int ret;
+       unsigned i;
 
        if (index >= res->ncerts) {
                gnutls_assert();
index 82e37126c244d58b4a3868ab71063d086d132854..bbbd2a85ec9f6c8097dadfd60d289470a2a066d3 100644 (file)
@@ -64,15 +64,15 @@ int key_recv_func(gnutls_session_t session, const unsigned char *keyfpr,
        return 0;
 }
 
+static
 void check_loaded_key(gnutls_certificate_credentials_t cred)
 {
        int err;
        gnutls_openpgp_privkey_t key;
        gnutls_openpgp_crt_t *crts;
-       int n_crts;
-       gnutls_datum_t datum;
+       unsigned n_crts;
        gnutls_openpgp_keyid_t keyid;
-       int i;
+       unsigned i;
 
        /* check that the getter functions for openpgp keys of
         * gnutls_certificate_credentials_t work and deliver the
index 4e07ae5661a279469e6e06fd81b82c888b46db0d..670d4d23f6fd634cb7179e2b3f26f4d2ec196476 100644 (file)
@@ -167,12 +167,12 @@ void doit(void)
 
        gnutls_x509_privkey_t get_key;
        gnutls_x509_crt_t *get_crts;
-       int n_get_crts;
+       unsigned n_get_crts;
        gnutls_datum_t get_datum;
        gnutls_x509_trust_list_t trust_list;
        gnutls_x509_trust_list_iter_t trust_iter;
        gnutls_x509_crt_t get_ca_crt;
-       int n_get_ca_crts;
+       unsigned n_get_ca_crts;
 
        /* this must be called once in the program
         */