[Pkg-gnupg-commit] [gnupg2] 114/132: g10, sm, dirmngr, common: Add comment for fall through.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed May 17 03:07:48 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit 0ce94a9698104d9bfc73d5a37478189564c96eb4
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Wed May 10 11:01:15 2017 +0900
g10, sm, dirmngr, common: Add comment for fall through.
* common/b64dec.c (b64dec_proc): Comment to clarify.
* dirmngr/cdblib.c (cdb_make_put): Use same pattern to clarify.
* dirmngr/dirmngr-client.c (read_pem_certificate): Likewise.
* dirmngr/ks-engine-hkp.c (ks_hkp_get): Likewise.
* g10/armor.c (unarmor_pump): Likewise.
* g10/gpg.c (main): Likewise.
* g10/import.c (read_block): Likewise.
* g10/keygen.c (make_backsig): Likewise.
* g10/pkclist.c (check_signatures_trust): Likewise.
* sm/gpgsm.c (main): Likewise.
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
---
common/b64dec.c | 1 +
dirmngr/cdblib.c | 2 +-
dirmngr/dirmngr-client.c | 2 +-
dirmngr/ks-engine-hkp.c | 1 +
g10/armor.c | 4 ++--
g10/gpg.c | 8 ++++----
g10/import.c | 2 +-
g10/keygen.c | 4 ++--
g10/pkclist.c | 2 +-
sm/gpgsm.c | 2 +-
10 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/common/b64dec.c b/common/b64dec.c
index 74cf933..6af494b 100644
--- a/common/b64dec.c
+++ b/common/b64dec.c
@@ -118,6 +118,7 @@ b64dec_proc (struct b64state *state, void *buffer, size_t length,
break;
case s_init:
ds = s_lfseen;
+ /* fall through */
case s_lfseen:
if (*s != "-----BEGIN "[pos])
{
diff --git a/dirmngr/cdblib.c b/dirmngr/cdblib.c
index c04690f..827399f 100644
--- a/dirmngr/cdblib.c
+++ b/dirmngr/cdblib.c
@@ -617,7 +617,7 @@ cdb_make_put(struct cdb_make *cdbmp,
else
r = 1;
}
- /* fall */
+ /* fall through */
case CDB_PUT_ADD:
rl = cdbmp->cdb_rec[hval&255];
diff --git a/dirmngr/dirmngr-client.c b/dirmngr/dirmngr-client.c
index c1ff635..4dc64bf 100644
--- a/dirmngr/dirmngr-client.c
+++ b/dirmngr/dirmngr-client.c
@@ -517,7 +517,7 @@ read_pem_certificate (const char *fname, unsigned char **rbuf, size_t *rbuflen)
}
break;
case s_init:
- state = s_lfseen;
+ state = s_lfseen; /* fall through */
case s_lfseen:
if (c != "-----BEGIN "[pos])
state = s_idle;
diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c
index 1592fab..ddb8549 100644
--- a/dirmngr/ks-engine-hkp.c
+++ b/dirmngr/ks-engine-hkp.c
@@ -1515,6 +1515,7 @@ ks_hkp_get (ctrl_t ctrl, parsed_uri_t uri, const char *keyspec, estream_t *r_fp)
case KEYDB_SEARCH_MODE_FPR16:
log_error ("HKP keyservers do not support v3 fingerprints\n");
+ /* fall through */
default:
return gpg_error (GPG_ERR_INV_USER_ID);
}
diff --git a/g10/armor.c b/g10/armor.c
index 7fb9a89..cc80968 100644
--- a/g10/armor.c
+++ b/g10/armor.c
@@ -1440,7 +1440,7 @@ unarmor_pump (UnarmorPump x, int c)
break;
case STA_first_dash: /* just need for initialization */
x->pos = 0;
- x->state = STA_compare_header;
+ x->state = STA_compare_header; /* fall through */
case STA_compare_header:
if ( "-----BEGIN PGP SIGNATURE-----"[++x->pos] == c ) {
if ( x->pos == 28 )
@@ -1521,7 +1521,7 @@ unarmor_pump (UnarmorPump x, int c)
/* assume that we are at the next line */
x->state = STA_read_crc;
x->pos = 0;
- x->mycrc = 0;
+ x->mycrc = 0; /* fall through */
case STA_read_crc:
if( (c = asctobin[c]) == 255 ) {
rval = -1; /* ready */
diff --git a/g10/gpg.c b/g10/gpg.c
index ecddb20..80e5197 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -4303,9 +4303,9 @@ main (int argc, char **argv)
break;
case aCheckKeys:
- opt.check_sigs = 1;
+ opt.check_sigs = 1; /* fall through */
case aListSigs:
- opt.list_sigs = 1;
+ opt.list_sigs = 1; /* fall through */
case aListKeys:
sl = NULL;
for( ; argc; argc--, argv++ )
@@ -4468,7 +4468,7 @@ main (int argc, char **argv)
break;
case aFastImport:
- opt.import_options |= IMPORT_FAST;
+ opt.import_options |= IMPORT_FAST; /* fall through */
case aImport:
import_keys (ctrl, argc? argv:NULL, argc, NULL, opt.import_options);
break;
@@ -4930,7 +4930,7 @@ main (int argc, char **argv)
if (!opt.quiet)
log_info (_("WARNING: no command supplied."
" Trying to guess what you mean ...\n"));
- /*FALLTHU*/
+ /*FALLTHRU*/
case aListPackets:
if( argc > 1 )
wrong_args("[filename]");
diff --git a/g10/import.c b/g10/import.c
index a942c2e..d9d658b 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -868,7 +868,7 @@ read_block( IOBUF a, int with_meta,
pkt = NULL;
goto ready;
}
- in_cert = 1;
+ in_cert = 1; /* fall through */
default:
x_default:
if (in_cert && valid_keyblock_packet (pkt->pkttype))
diff --git a/g10/keygen.c b/g10/keygen.c
index 2db37bf..0dfed63 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -910,10 +910,10 @@ make_backsig (ctrl_t ctrl, PKT_signature *sig, PKT_public_key *pk,
case 2:
pktlen = (size_t)buf[mark++] << 24;
pktlen |= buf[mark++] << 16;
-
+ /* fall through */
case 1:
pktlen |= buf[mark++] << 8;
-
+ /* fall through */
case 0:
pktlen |= buf[mark++];
}
diff --git a/g10/pkclist.c b/g10/pkclist.c
index e65da25..ab024d9 100644
--- a/g10/pkclist.c
+++ b/g10/pkclist.c
@@ -632,7 +632,7 @@ check_signatures_trust (ctrl_t ctrl, PKT_signature *sig)
log_info (_("trustlevel adjusted to FULL"
" due to valid PKA info\n"));
}
- /* (fall through) */
+ /* fall through */
case TRUST_FULLY:
if (!okay)
{
diff --git a/sm/gpgsm.c b/sm/gpgsm.c
index bcf479a..cb181e8 100644
--- a/sm/gpgsm.c
+++ b/sm/gpgsm.c
@@ -1855,7 +1855,7 @@ main ( int argc, char **argv)
case aListChain:
case aDumpChain:
- ctrl.with_chain = 1;
+ ctrl.with_chain = 1; /* fall through */
case aListKeys:
case aDumpKeys:
case aListExternalKeys:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list