diff options
| author | NIIBE Yutaka <gniibe@fsij.org> | 2015-10-13 12:28:00 +0900 |
|---|---|---|
| committer | NIIBE Yutaka <gniibe@fsij.org> | 2015-10-13 13:09:32 +0900 |
| commit | 24f6c65e36edec13aa781862ff1ff45ca3e99b99 (patch) | |
| tree | 0a79e4b8d3aa722d990c1e63194bfb4c4242f975 | |
| parent | 936098e99bd29cb3627c6aa296e3895feb53fa27 (diff) | |
| download | libgcrypt-24f6c65e36edec13aa781862ff1ff45ca3e99b99.tar.gz | |
Fix declaration of return type.
* src/gcrypt-int.h (_gcry_sexp_extract_param): Return gpg_error_t.
(_gcry_mpi_ec_new, _gcry_mpi_ec_set_mpi, _gcry_mpi_ec_set_point):
Remove.
* cipher/dsa.c (dsa_generate): Fix call to _gcry_sexp_extract_param.
* src/g10lib.h (_gcry_vcontrol): Return gcry_err_code_t.
* src/visibility.c (gcry_mpi_snatch): Fix call to _gcry_mpi_snatch.
--
GnuPG-bug-id: 2074
(backported from master
commit 73374fdd27c7ba28b19f9672c68a6f5b72252fe5)
| -rw-r--r-- | cipher/dsa.c | 8 | ||||
| -rw-r--r-- | src/g10lib.h | 2 | ||||
| -rw-r--r-- | src/gcrypt-int.h | 14 | ||||
| -rw-r--r-- | src/visibility.c | 2 |
4 files changed, 11 insertions, 15 deletions
diff --git a/cipher/dsa.c b/cipher/dsa.c index 09cd9693..723f6909 100644 --- a/cipher/dsa.c +++ b/cipher/dsa.c @@ -968,12 +968,14 @@ dsa_generate (const gcry_sexp_t genparms, gcry_sexp_t *r_skey) static gcry_err_code_t dsa_check_secret_key (gcry_sexp_t keyparms) { + gcry_error_t err; gcry_err_code_t rc; DSA_secret_key sk = {NULL, NULL, NULL, NULL, NULL}; - rc = _gcry_sexp_extract_param (keyparms, NULL, "pqgyx", - &sk.p, &sk.q, &sk.g, &sk.y, &sk.x, - NULL); + err = _gcry_sexp_extract_param (keyparms, NULL, "pqgyx", + &sk.p, &sk.q, &sk.g, &sk.y, &sk.x, + NULL); + rc = gpg_err_code (err); if (rc) goto leave; diff --git a/src/g10lib.h b/src/g10lib.h index 238871d0..3bd48fa0 100644 --- a/src/g10lib.h +++ b/src/g10lib.h @@ -92,7 +92,7 @@ /*-- src/global.c -*/ int _gcry_global_is_operational (void); -gcry_error_t _gcry_vcontrol (enum gcry_ctl_cmds cmd, va_list arg_ptr); +gcry_err_code_t _gcry_vcontrol (enum gcry_ctl_cmds cmd, va_list arg_ptr); void _gcry_check_heap (const void *a); int _gcry_get_debug_flag (unsigned int mask); diff --git a/src/gcrypt-int.h b/src/gcrypt-int.h index 65dcb4d0..b6e58265 100644 --- a/src/gcrypt-int.h +++ b/src/gcrypt-int.h @@ -328,10 +328,10 @@ void *_gcry_sexp_nth_buffer (const gcry_sexp_t list, int number, size_t *rlength); char *_gcry_sexp_nth_string (gcry_sexp_t list, int number); gcry_mpi_t _gcry_sexp_nth_mpi (gcry_sexp_t list, int number, int mpifmt); -gpg_err_code_t _gcry_sexp_extract_param (gcry_sexp_t sexp, - const char *path, - const char *list, - ...) _GCRY_GCC_ATTR_SENTINEL(0); +gpg_error_t _gcry_sexp_extract_param (gcry_sexp_t sexp, + const char *path, + const char *list, + ...) _GCRY_GCC_ATTR_SENTINEL(0); #define sexp_new(a, b, c, d) _gcry_sexp_new ((a), (b), (c), (d)) #define sexp_create(a, b, c, d, e) _gcry_sexp_create ((a), (b), (c), (d), (e)) @@ -415,15 +415,9 @@ gcry_mpi_point_t _gcry_mpi_point_set (gcry_mpi_point_t point, gcry_mpi_point_t _gcry_mpi_point_snatch_set (gcry_mpi_point_t point, gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_t z); -gpg_error_t _gcry_mpi_ec_new (gcry_ctx_t *r_ctx, - gcry_sexp_t keyparam, const char *curvename); gcry_mpi_t _gcry_mpi_ec_get_mpi (const char *name, gcry_ctx_t ctx, int copy); gcry_mpi_point_t _gcry_mpi_ec_get_point (const char *name, gcry_ctx_t ctx, int copy); -gpg_error_t _gcry_mpi_ec_set_mpi (const char *name, gcry_mpi_t newvalue, - gcry_ctx_t ctx); -gpg_error_t _gcry_mpi_ec_set_point (const char *name, gcry_mpi_point_t newvalue, - gcry_ctx_t ctx); int _gcry_mpi_ec_get_affine (gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_point_t point, mpi_ec_t ctx); void _gcry_mpi_ec_dup (gcry_mpi_point_t w, gcry_mpi_point_t u, gcry_ctx_t ctx); diff --git a/src/visibility.c b/src/visibility.c index 2989498e..b71c8392 100644 --- a/src/visibility.c +++ b/src/visibility.c @@ -292,7 +292,7 @@ gcry_mpi_copy (const gcry_mpi_t a) void gcry_mpi_snatch (gcry_mpi_t w, const gcry_mpi_t u) { - return _gcry_mpi_snatch (w, u); + _gcry_mpi_snatch (w, u); } gcry_mpi_t |
