mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-18 14:17:03 +01:00
scd: Fix compiler warnings for app-openpgp.c.
* scd/app-openpgp.c (retrieve_key_material): Remove touching I. (do_change_pin): Make sure going to leave if PINVALUE == 0. (rsa_writekey): Emit simpler log. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
9bf39ed75d
commit
e6ca015ae1
@ -1280,7 +1280,6 @@ retrieve_key_material (FILE *fp, const char *hexkeyid,
|
|||||||
|
|
||||||
if ( strcmp (fields[0], "pkd") )
|
if ( strcmp (fields[0], "pkd") )
|
||||||
continue; /* Not a key data record. */
|
continue; /* Not a key data record. */
|
||||||
i = 0; /* Avoid erroneous compiler warning. */
|
|
||||||
if ( nfields < 4 || (i = atoi (fields[1])) < 0 || i > 1
|
if ( nfields < 4 || (i = atoi (fields[1])) < 0 || i > 1
|
||||||
|| (!i && m_new) || (i && e_new))
|
|| (!i && m_new) || (i && e_new))
|
||||||
{
|
{
|
||||||
@ -2652,7 +2651,7 @@ do_change_pin (app_t app, ctrl_t ctrl, const char *chvnostr,
|
|||||||
rc = pincb (pincb_arg, set_resetcode? _("|RN|New Reset Code") :
|
rc = pincb (pincb_arg, set_resetcode? _("|RN|New Reset Code") :
|
||||||
chvno == 3? _("|AN|New Admin PIN") : _("|N|New PIN"),
|
chvno == 3? _("|AN|New Admin PIN") : _("|N|New PIN"),
|
||||||
&pinvalue);
|
&pinvalue);
|
||||||
if (rc)
|
if (rc || pinvalue == NULL)
|
||||||
{
|
{
|
||||||
log_error (_("error getting new PIN: %s\n"), gpg_strerror (rc));
|
log_error (_("error getting new PIN: %s\n"), gpg_strerror (rc));
|
||||||
goto leave;
|
goto leave;
|
||||||
@ -3352,8 +3351,7 @@ rsa_writekey (app_t app, gpg_error_t (*pincb)(void*, const char *, char **),
|
|||||||
maxbits = app->app_local->keyattr[keyno].rsa.n_bits;
|
maxbits = app->app_local->keyattr[keyno].rsa.n_bits;
|
||||||
nbits = rsa_n? count_bits (rsa_n, rsa_n_len) : 0;
|
nbits = rsa_n? count_bits (rsa_n, rsa_n_len) : 0;
|
||||||
if (opt.verbose)
|
if (opt.verbose)
|
||||||
log_info ("RSA modulus size is %u bits (%u bytes)\n",
|
log_info ("RSA modulus size is %u bits\n", nbits);
|
||||||
nbits, (unsigned int)rsa_n_len);
|
|
||||||
if (nbits && nbits != maxbits
|
if (nbits && nbits != maxbits
|
||||||
&& app->app_local->extcap.algo_attr_change)
|
&& app->app_local->extcap.algo_attr_change)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user