1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-23 10:29:58 +01:00

indent: Fix indentation of read_block in g10/import.c

--

Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit 60e7e102a153a246d7e887a64e30dbb4c4f7b6dd)
This commit is contained in:
Werner Koch 2018-07-04 09:45:52 +02:00
parent ef50fdf82a
commit 5b47b46132
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -826,76 +826,77 @@ read_block( IOBUF a, int with_meta,
continue; continue;
} }
if (in_v3key && !(pkt->pkttype == PKT_PUBLIC_KEY if (in_v3key && !(pkt->pkttype == PKT_PUBLIC_KEY
|| pkt->pkttype == PKT_SECRET_KEY)) || pkt->pkttype == PKT_SECRET_KEY))
{ {
free_packet (pkt, &parsectx); free_packet (pkt, &parsectx);
init_packet(pkt); init_packet(pkt);
continue; continue;
} }
in_v3key = 0; in_v3key = 0;
if (!root && pkt->pkttype == PKT_SIGNATURE if (!root && pkt->pkttype == PKT_SIGNATURE
&& IS_KEY_REV (pkt->pkt.signature) ) && IS_KEY_REV (pkt->pkt.signature) )
{ {
/* This is a revocation certificate which is handled in a /* This is a revocation certificate which is handled in a
* special way. */ * special way. */
root = new_kbnode( pkt ); root = new_kbnode( pkt );
pkt = NULL; pkt = NULL;
goto ready; goto ready;
} }
/* Make a linked list of all packets. */ /* Make a linked list of all packets. */
switch (pkt->pkttype) switch (pkt->pkttype)
{ {
case PKT_COMPRESSED: case PKT_COMPRESSED:
if (check_compress_algo (pkt->pkt.compressed->algorithm)) if (check_compress_algo (pkt->pkt.compressed->algorithm))
{ {
rc = GPG_ERR_COMPR_ALGO; rc = GPG_ERR_COMPR_ALGO;
goto ready; goto ready;
} }
else else
{ {
compress_filter_context_t *cfx = xmalloc_clear( sizeof *cfx ); compress_filter_context_t *cfx = xmalloc_clear( sizeof *cfx );
pkt->pkt.compressed->buf = NULL; pkt->pkt.compressed->buf = NULL;
if (push_compress_filter2 (a, cfx, if (push_compress_filter2 (a, cfx,
pkt->pkt.compressed->algorithm, 1)) pkt->pkt.compressed->algorithm, 1))
xfree (cfx); /* e.g. in case of compression_algo NONE. */ xfree (cfx); /* e.g. in case of compression_algo NONE. */
} }
free_packet (pkt, &parsectx); free_packet (pkt, &parsectx);
init_packet(pkt); init_packet(pkt);
break; break;
case PKT_RING_TRUST: case PKT_RING_TRUST:
/* Skip those packets unless we are in restore mode. */ /* Skip those packets unless we are in restore mode. */
if ((opt.import_options & IMPORT_RESTORE)) if ((opt.import_options & IMPORT_RESTORE))
goto x_default; goto x_default;
free_packet (pkt, &parsectx); free_packet (pkt, &parsectx);
init_packet(pkt); init_packet(pkt);
break; break;
case PKT_PUBLIC_KEY: case PKT_PUBLIC_KEY:
case PKT_SECRET_KEY: case PKT_SECRET_KEY:
if (in_cert ) /* Store this packet. */ if (in_cert ) /* Store this packet. */
{ {
*pending_pkt = pkt; *pending_pkt = pkt;
pkt = NULL; pkt = NULL;
goto ready; goto ready;
} }
in_cert = 1; /* fall through */ in_cert = 1;
default: /* fall through */
x_default: default:
if (in_cert && valid_keyblock_packet (pkt->pkttype)) x_default:
{ if (in_cert && valid_keyblock_packet (pkt->pkttype))
if (!root ) {
root = new_kbnode (pkt); if (!root )
else root = new_kbnode (pkt);
add_kbnode (root, new_kbnode (pkt)); else
pkt = xmalloc (sizeof *pkt); add_kbnode (root, new_kbnode (pkt));
} pkt = xmalloc (sizeof *pkt);
init_packet(pkt); }
break; init_packet(pkt);
} break;
}
} }
ready: ready: