mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
gpg: Remove unused args from a function.
* g10/keyserver.c (parse_keyserver_uri): Remove args configname and configlineno. Change all callers. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
56e6888233
commit
616e511f27
@ -754,7 +754,7 @@ fetch_url (ctrl_t ctrl)
|
|||||||
gpg_strerror(rc));
|
gpg_strerror(rc));
|
||||||
else if (info.pubkey_url && *info.pubkey_url)
|
else if (info.pubkey_url && *info.pubkey_url)
|
||||||
{
|
{
|
||||||
spec=parse_keyserver_uri(info.pubkey_url,1,NULL,0);
|
spec = parse_keyserver_uri (info.pubkey_url, 1);
|
||||||
if(spec && info.fpr1valid)
|
if(spec && info.fpr1valid)
|
||||||
{
|
{
|
||||||
/* This is not perfectly right. Currently, all card
|
/* This is not perfectly right. Currently, all card
|
||||||
|
@ -2938,7 +2938,7 @@ parse_auto_key_locate (char *options)
|
|||||||
else if (ascii_strcasecmp (tok, "pka") == 0)
|
else if (ascii_strcasecmp (tok, "pka") == 0)
|
||||||
akl->type = AKL_PKA;
|
akl->type = AKL_PKA;
|
||||||
#endif
|
#endif
|
||||||
else if ((akl->spec = parse_keyserver_uri (tok, 1, NULL, 0)))
|
else if ((akl->spec = parse_keyserver_uri (tok, 1)))
|
||||||
akl->type = AKL_SPEC;
|
akl->type = AKL_SPEC;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2800,8 +2800,7 @@ main (int argc, char **argv)
|
|||||||
case oKeyServer:
|
case oKeyServer:
|
||||||
{
|
{
|
||||||
keyserver_spec_t keyserver;
|
keyserver_spec_t keyserver;
|
||||||
keyserver = parse_keyserver_uri (pargs.r.ret_str,0,
|
keyserver = parse_keyserver_uri (pargs.r.ret_str, 0);
|
||||||
configname,configlineno);
|
|
||||||
if (!keyserver)
|
if (!keyserver)
|
||||||
log_error (_("could not parse keyserver URL\n"));
|
log_error (_("could not parse keyserver URL\n"));
|
||||||
else
|
else
|
||||||
@ -2990,8 +2989,7 @@ main (int argc, char **argv)
|
|||||||
case oDefaultKeyserverURL:
|
case oDefaultKeyserverURL:
|
||||||
{
|
{
|
||||||
keyserver_spec_t keyserver;
|
keyserver_spec_t keyserver;
|
||||||
keyserver = parse_keyserver_uri (pargs.r.ret_str,1,
|
keyserver = parse_keyserver_uri (pargs.r.ret_str,1 );
|
||||||
configname,configlineno);
|
|
||||||
if (!keyserver)
|
if (!keyserver)
|
||||||
log_error (_("could not parse keyserver URL\n"));
|
log_error (_("could not parse keyserver URL\n"));
|
||||||
else
|
else
|
||||||
|
@ -4165,7 +4165,7 @@ menu_set_keyserver_url (const char *url, KBNODE pub_keyblock)
|
|||||||
{
|
{
|
||||||
struct keyserver_spec *keyserver = NULL;
|
struct keyserver_spec *keyserver = NULL;
|
||||||
/* Sanity check the format */
|
/* Sanity check the format */
|
||||||
keyserver = parse_keyserver_uri (answer, 1, NULL, 0);
|
keyserver = parse_keyserver_uri (answer, 1);
|
||||||
xfree (answer);
|
xfree (answer);
|
||||||
if (!keyserver)
|
if (!keyserver)
|
||||||
{
|
{
|
||||||
|
@ -3106,7 +3106,7 @@ proc_parameter_file( struct para_data_s *para, const char *fname,
|
|||||||
{
|
{
|
||||||
struct keyserver_spec *spec;
|
struct keyserver_spec *spec;
|
||||||
|
|
||||||
spec=parse_keyserver_uri(s1,1,NULL,0);
|
spec = parse_keyserver_uri (s1, 1);
|
||||||
if(spec)
|
if(spec)
|
||||||
{
|
{
|
||||||
free_keyserver_spec(spec);
|
free_keyserver_spec(spec);
|
||||||
|
@ -28,10 +28,8 @@
|
|||||||
int parse_keyserver_options(char *options);
|
int parse_keyserver_options(char *options);
|
||||||
void free_keyserver_spec(struct keyserver_spec *keyserver);
|
void free_keyserver_spec(struct keyserver_spec *keyserver);
|
||||||
struct keyserver_spec *keyserver_match(struct keyserver_spec *spec);
|
struct keyserver_spec *keyserver_match(struct keyserver_spec *spec);
|
||||||
struct keyserver_spec *parse_keyserver_uri(const char *string,
|
struct keyserver_spec *parse_keyserver_uri (const char *string,
|
||||||
int require_scheme,
|
int require_scheme);
|
||||||
const char *configname,
|
|
||||||
unsigned int configlineno);
|
|
||||||
struct keyserver_spec *parse_preferred_keyserver(PKT_signature *sig);
|
struct keyserver_spec *parse_preferred_keyserver(PKT_signature *sig);
|
||||||
int keyserver_export (ctrl_t ctrl, strlist_t users);
|
int keyserver_export (ctrl_t ctrl, strlist_t users);
|
||||||
int keyserver_import (ctrl_t ctrl, strlist_t users);
|
int keyserver_import (ctrl_t ctrl, strlist_t users);
|
||||||
|
@ -258,8 +258,7 @@ keyserver_match(struct keyserver_spec *spec)
|
|||||||
keyserver/ksutil.c for limited use in gpgkeys_ldap or the like. */
|
keyserver/ksutil.c for limited use in gpgkeys_ldap or the like. */
|
||||||
|
|
||||||
keyserver_spec_t
|
keyserver_spec_t
|
||||||
parse_keyserver_uri (const char *string,int require_scheme,
|
parse_keyserver_uri (const char *string,int require_scheme)
|
||||||
const char *configname,unsigned int configlineno)
|
|
||||||
{
|
{
|
||||||
int assume_hkp=0;
|
int assume_hkp=0;
|
||||||
struct keyserver_spec *keyserver;
|
struct keyserver_spec *keyserver;
|
||||||
@ -481,7 +480,7 @@ parse_preferred_keyserver(PKT_signature *sig)
|
|||||||
|
|
||||||
memcpy(dupe,p,plen);
|
memcpy(dupe,p,plen);
|
||||||
dupe[plen]='\0';
|
dupe[plen]='\0';
|
||||||
spec=parse_keyserver_uri(dupe,1,NULL,0);
|
spec = parse_keyserver_uri (dupe, 1);
|
||||||
xfree(dupe);
|
xfree(dupe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1931,7 +1930,7 @@ keyserver_import_cert (ctrl_t ctrl,
|
|||||||
{
|
{
|
||||||
struct keyserver_spec *spec;
|
struct keyserver_spec *spec;
|
||||||
|
|
||||||
spec=parse_keyserver_uri(url,1,NULL,0);
|
spec = parse_keyserver_uri (url, 1);
|
||||||
if(spec)
|
if(spec)
|
||||||
{
|
{
|
||||||
err = keyserver_import_fprint (ctrl, *fpr,*fpr_len,spec);
|
err = keyserver_import_fprint (ctrl, *fpr,*fpr_len,spec);
|
||||||
@ -1977,7 +1976,7 @@ keyserver_import_pka (ctrl_t ctrl,
|
|||||||
{
|
{
|
||||||
/* An URI is available. Lookup the key. */
|
/* An URI is available. Lookup the key. */
|
||||||
struct keyserver_spec *spec;
|
struct keyserver_spec *spec;
|
||||||
spec = parse_keyserver_uri (uri, 1, NULL, 0);
|
spec = parse_keyserver_uri (uri, 1);
|
||||||
if (spec)
|
if (spec)
|
||||||
{
|
{
|
||||||
rc = keyserver_import_fprint (ctrl, *fpr, 20, spec);
|
rc = keyserver_import_fprint (ctrl, *fpr, 20, spec);
|
||||||
|
@ -1739,7 +1739,7 @@ check_sig_and_print (CTX c, kbnode_t node)
|
|||||||
int res;
|
int res;
|
||||||
struct keyserver_spec *spec;
|
struct keyserver_spec *spec;
|
||||||
|
|
||||||
spec = parse_keyserver_uri (uri, 1, NULL, 0);
|
spec = parse_keyserver_uri (uri, 1);
|
||||||
if (spec)
|
if (spec)
|
||||||
{
|
{
|
||||||
glo_ctrl.in_auto_key_retrieve++;
|
glo_ctrl.in_auto_key_retrieve++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user