1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-07 23:27:48 +02:00

g10/packet.h: Remove unused argument from enum_sig_subpkt.

* g10/packet.h (enum_sig_subpkt): Remove argument RET_N.  Update
callers.
* g10/parse-packet.c (enum_sig_subpkt): Remove argument RET_N.

--
Remove the RET_N argument, because it is unused and because it is
meaningless: it's not clear whether it is an offset into SIG->HASHED
or SIG->UNHASHED.

Signed-off-by: Neal H. Walfield <neal@g10code.com>.
This commit is contained in:
Neal H. Walfield 2015-08-19 11:45:24 +02:00
parent c271feb536
commit c46e8bfe9a
2 changed files with 6 additions and 8 deletions

View File

@ -457,8 +457,7 @@ const byte *parse_sig_subpkt ( const subpktarea_t *buffer,
sigsubpkttype_t reqtype, sigsubpkttype_t reqtype,
size_t *ret_n ); size_t *ret_n );
const byte *parse_sig_subpkt2 ( PKT_signature *sig, const byte *parse_sig_subpkt2 ( PKT_signature *sig,
sigsubpkttype_t reqtype, sigsubpkttype_t reqtype);
size_t *ret_n );
int parse_one_sig_subpkt( const byte *buffer, size_t n, int type ); int parse_one_sig_subpkt( const byte *buffer, size_t n, int type );
void parse_revkeys(PKT_signature *sig); void parse_revkeys(PKT_signature *sig);
int parse_attribute_subpkts(PKT_user_id *uid); int parse_attribute_subpkts(PKT_user_id *uid);

View File

@ -1585,14 +1585,13 @@ parse_sig_subpkt (const subpktarea_t * buffer, sigsubpkttype_t reqtype,
const byte * const byte *
parse_sig_subpkt2 (PKT_signature * sig, sigsubpkttype_t reqtype, parse_sig_subpkt2 (PKT_signature * sig, sigsubpkttype_t reqtype)
size_t * ret_n)
{ {
const byte *p; const byte *p;
p = parse_sig_subpkt (sig->hashed, reqtype, ret_n); p = parse_sig_subpkt (sig->hashed, reqtype, NULL);
if (!p) if (!p)
p = parse_sig_subpkt (sig->unhashed, reqtype, ret_n); p = parse_sig_subpkt (sig->unhashed, reqtype, NULL);
return p; return p;
} }
@ -1767,7 +1766,7 @@ parse_signature (IOBUF inp, int pkttype, unsigned long pktlen,
&& opt.verbose) && opt.verbose)
log_info ("signature packet without timestamp\n"); log_info ("signature packet without timestamp\n");
p = parse_sig_subpkt2 (sig, SIGSUBPKT_ISSUER, NULL); p = parse_sig_subpkt2 (sig, SIGSUBPKT_ISSUER);
if (p) if (p)
{ {
sig->keyid[0] = buf32_to_u32 (p); sig->keyid[0] = buf32_to_u32 (p);
@ -1821,7 +1820,7 @@ parse_signature (IOBUF inp, int pkttype, unsigned long pktlen,
unhashed area. In theory, anyway, we should never see this unhashed area. In theory, anyway, we should never see this
packet off of a local keyring. */ packet off of a local keyring. */
p = parse_sig_subpkt2 (sig, SIGSUBPKT_EXPORTABLE, NULL); p = parse_sig_subpkt2 (sig, SIGSUBPKT_EXPORTABLE);
if (p && *p == 0) if (p && *p == 0)
sig->flags.exportable = 0; sig->flags.exportable = 0;