1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-20 01:02:44 +02:00

gpg,indent: Re-indent and chnage var names in sign.c

--

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-06-13 09:37:53 +02:00
parent 2494ce190b
commit 18b03e756b
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -59,92 +59,91 @@ static void
mk_notation_policy_etc (PKT_signature *sig, mk_notation_policy_etc (PKT_signature *sig,
PKT_public_key *pk, PKT_public_key *pksk) PKT_public_key *pk, PKT_public_key *pksk)
{ {
const char *string; const char *string;
char *s=NULL; char *p = NULL;
strlist_t pu=NULL; strlist_t pu = NULL;
struct notation *nd=NULL; struct notation *nd = NULL;
struct expando_args args; struct expando_args args;
log_assert(sig->version>=4); log_assert (sig->version >= 4);
memset(&args,0,sizeof(args)); memset (&args, 0, sizeof(args));
args.pk=pk; args.pk = pk;
args.pksk=pksk; args.pksk = pksk;
/* notation data */ /* Notation data. */
if(IS_SIG(sig) && opt.sig_notations) if (IS_SIG(sig) && opt.sig_notations)
nd=opt.sig_notations; nd = opt.sig_notations;
else if( IS_CERT(sig) && opt.cert_notations ) else if (IS_CERT(sig) && opt.cert_notations)
nd=opt.cert_notations; nd = opt.cert_notations;
if(nd) if (nd)
{ {
struct notation *i; struct notation *item;
for(i=nd;i;i=i->next) for (item = nd; item; item = item->next)
{ {
i->altvalue=pct_expando(i->value,&args); item->altvalue = pct_expando (item->value,&args);
if(!i->altvalue) if (!item->altvalue)
log_error(_("WARNING: unable to %%-expand notation " log_error (_("WARNING: unable to %%-expand notation "
"(too large). Using unexpanded.\n")); "(too large). Using unexpanded.\n"));
} }
keygen_add_notations(sig,nd); keygen_add_notations (sig, nd);
for(i=nd;i;i=i->next) for (item = nd; item; item = item->next)
{ {
xfree(i->altvalue); xfree (item->altvalue);
i->altvalue=NULL; item->altvalue = NULL;
} }
} }
/* set policy URL */ /* Set policy URL. */
if( IS_SIG(sig) && opt.sig_policy_url ) if (IS_SIG(sig) && opt.sig_policy_url)
pu=opt.sig_policy_url; pu = opt.sig_policy_url;
else if( IS_CERT(sig) && opt.cert_policy_url ) else if (IS_CERT(sig) && opt.cert_policy_url)
pu=opt.cert_policy_url; pu = opt.cert_policy_url;
for(;pu;pu=pu->next) for (; pu; pu = pu->next)
{ {
string = pu->d; string = pu->d;
s=pct_expando(string,&args); p = pct_expando (string, &args);
if(!s) if (!p)
{ {
log_error(_("WARNING: unable to %%-expand policy URL " log_error(_("WARNING: unable to %%-expand policy URL "
"(too large). Using unexpanded.\n")); "(too large). Using unexpanded.\n"));
s=xstrdup(string); p = xstrdup(string);
} }
build_sig_subpkt(sig,SIGSUBPKT_POLICY| build_sig_subpkt (sig, (SIGSUBPKT_POLICY
((pu->flags & 1)?SIGSUBPKT_FLAG_CRITICAL:0), | ((pu->flags & 1)?SIGSUBPKT_FLAG_CRITICAL:0)),
s,strlen(s)); p, strlen (p));
xfree(s); xfree (p);
} }
/* preferred keyserver URL */ /* Preferred keyserver URL. */
if( IS_SIG(sig) && opt.sig_keyserver_url ) if (IS_SIG(sig) && opt.sig_keyserver_url)
pu=opt.sig_keyserver_url; pu = opt.sig_keyserver_url;
for(;pu;pu=pu->next) for (; pu; pu = pu->next)
{ {
string = pu->d; string = pu->d;
s=pct_expando(string,&args); p = pct_expando (string, &args);
if(!s) if (!p)
{ {
log_error(_("WARNING: unable to %%-expand preferred keyserver URL" log_error (_("WARNING: unable to %%-expand preferred keyserver URL"
" (too large). Using unexpanded.\n")); " (too large). Using unexpanded.\n"));
s=xstrdup(string); p = xstrdup (string);
} }
build_sig_subpkt(sig,SIGSUBPKT_PREF_KS| build_sig_subpkt (sig, (SIGSUBPKT_PREF_KS
((pu->flags & 1)?SIGSUBPKT_FLAG_CRITICAL:0), | ((pu->flags & 1)?SIGSUBPKT_FLAG_CRITICAL:0)),
s,strlen(s)); p, strlen (p));
xfree (p);
xfree(s); }
}
} }