diff options
author | Simon Josefsson <simon@josefsson.org> | 2009-11-05 09:50:01 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2009-11-05 09:50:01 +0100 |
commit | e2a5fa157eb1c5fcc946a4690553497d2cb04c09 (patch) | |
tree | 159d5585846d1ffb7f06d03f4c4f0e46a1d487ba /lib/opencdk/read-packet.c | |
parent | 91b652d36dcb57db89d7edab6caa88d211f7d859 (diff) | |
download | gnutls-e2a5fa157eb1c5fcc946a4690553497d2cb04c09.tar.gz |
Indent code.
Diffstat (limited to 'lib/opencdk/read-packet.c')
-rw-r--r-- | lib/opencdk/read-packet.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/lib/opencdk/read-packet.c b/lib/opencdk/read-packet.c index 97e844be0f..a2ab51b166 100644 --- a/lib/opencdk/read-packet.c +++ b/lib/opencdk/read-packet.c @@ -128,15 +128,15 @@ read_mpi (cdk_stream_t inp, bigint_t * ret_m, int secure) if (nbits > MAX_MPI_BITS || nbits == 0) { - _cdk_log_debug ("read_mpi: too large %d bits\n",(int) nbits); + _cdk_log_debug ("read_mpi: too large %d bits\n", (int) nbits); return CDK_MPI_Error; /* Sanity check */ } rc = stream_read (inp, buf + 2, nread, &nread); if (!rc && nread != ((nbits + 7) / 8)) { - _cdk_log_debug ("read_mpi: too short %d < %d\n", (int)nread, - (int)((nbits + 7) / 8)); + _cdk_log_debug ("read_mpi: too short %d < %d\n", (int) nread, + (int) ((nbits + 7) / 8)); return CDK_MPI_Error; } @@ -197,7 +197,7 @@ read_pubkey_enc (cdk_stream_t inp, size_t pktlen, cdk_pkt_pubkey_enc_t pke) return CDK_Inv_Value; if (DEBUG_PKT) - _cdk_log_debug ("read_pubkey_enc: %d octets\n", (int)pktlen); + _cdk_log_debug ("read_pubkey_enc: %d octets\n", (int) pktlen); if (pktlen < 12) return CDK_Inv_Packet; @@ -251,7 +251,7 @@ read_compressed (cdk_stream_t inp, size_t pktlen, cdk_pkt_compressed_t c) return CDK_Inv_Value; if (DEBUG_PKT) - _cdk_log_debug ("read_compressed: %d octets\n", (int)pktlen); + _cdk_log_debug ("read_compressed: %d octets\n", (int) pktlen); c->algorithm = cdk_stream_getc (inp); if (c->algorithm > 3) @@ -278,7 +278,7 @@ read_public_key (cdk_stream_t inp, size_t pktlen, cdk_pkt_pubkey_t pk) return CDK_Inv_Value; if (DEBUG_PKT) - _cdk_log_debug ("read_public_key: %d octets\n", (int)pktlen); + _cdk_log_debug ("read_public_key: %d octets\n", (int) pktlen); pk->is_invalid = 1; /* default to detect missing self signatures */ pk->is_revoked = 0; @@ -336,7 +336,7 @@ read_secret_key (cdk_stream_t inp, size_t pktlen, cdk_pkt_seckey_t sk) return CDK_Inv_Value; if (DEBUG_PKT) - _cdk_log_debug ("read_secret_key: %d octets\n", (int)pktlen); + _cdk_log_debug ("read_secret_key: %d octets\n", (int) pktlen); p1 = cdk_stream_tell (inp); rc = read_public_key (inp, pktlen, sk->pk); @@ -631,7 +631,7 @@ read_onepass_sig (cdk_stream_t inp, size_t pktlen, cdk_pkt_onepass_sig_t sig) return CDK_Inv_Value; if (DEBUG_PKT) - _cdk_log_debug ("read_onepass_sig: %d octets\n", (int)pktlen); + _cdk_log_debug ("read_onepass_sig: %d octets\n", (int) pktlen); if (pktlen != 13) return CDK_Inv_Packet; @@ -730,7 +730,7 @@ read_signature (cdk_stream_t inp, size_t pktlen, cdk_pkt_signature_t sig) return CDK_Inv_Value; if (DEBUG_PKT) - _cdk_log_debug ("read_signature: %d octets\n", (int)pktlen); + _cdk_log_debug ("read_signature: %d octets\n", (int) pktlen); if (pktlen < 16) return CDK_Inv_Packet; @@ -836,7 +836,7 @@ read_literal (cdk_stream_t inp, size_t pktlen, *ret_pt = pt = cdk_realloc (pt, sizeof *pt + pt->namelen + 2); if (!pt) return CDK_Out_Of_Core; - pt->name = (char*)pt + sizeof(*pt); + pt->name = (char *) pt + sizeof (*pt); rc = stream_read (inp, pt->name, pt->namelen, &nread); if (rc) return rc; @@ -958,7 +958,8 @@ cdk_pkt_read (cdk_stream_t inp, cdk_packet_t pkt) if (!(ctb & 0x80)) { _cdk_log_info ("cdk_pkt_read: no openpgp data found. " - "(ctb=%02X; fpos=%02X)\n",(int) ctb, (int)cdk_stream_tell (inp)); + "(ctb=%02X; fpos=%02X)\n", (int) ctb, + (int) cdk_stream_tell (inp)); return CDK_Inv_Packet; } @@ -998,7 +999,8 @@ cdk_pkt_read (cdk_stream_t inp, cdk_packet_t pkt) + pkt->pktlen + 16 + 1); if (!pkt->pkt.user_id) return CDK_Out_Of_Core; - pkt->pkt.user_id->name = (char*)pkt->pkt.user_id + sizeof(*pkt->pkt.user_id); + pkt->pkt.user_id->name = + (char *) pkt->pkt.user_id + sizeof (*pkt->pkt.user_id); rc = read_attribute (inp, pktlen, pkt->pkt.user_id); pkt->pkttype = CDK_PKT_ATTRIBUTE; @@ -1009,7 +1011,8 @@ cdk_pkt_read (cdk_stream_t inp, cdk_packet_t pkt) + pkt->pktlen + 1); if (!pkt->pkt.user_id) return CDK_Out_Of_Core; - pkt->pkt.user_id->name = (char*)pkt->pkt.user_id + sizeof(*pkt->pkt.user_id); + pkt->pkt.user_id->name = + (char *) pkt->pkt.user_id + sizeof (*pkt->pkt.user_id); rc = read_user_id (inp, pktlen, pkt->pkt.user_id); break; |