summaryrefslogtreecommitdiffstats
path: root/lib/base64.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/base64.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/base64.c b/lib/base64.c
index 1507b02..ee2e838 100644
--- a/lib/base64.c
+++ b/lib/base64.c
@@ -9,6 +9,7 @@
#endif
#include "base64.h"
+#include "compiler.h"
static const int CHARS_PER_LINE = 72;
static const char *ENCODING =
@@ -41,6 +42,7 @@ int base64_encode_block(const char *plaintext_in, int length_in, char *code_out,
switch (state_in->step) {
while (1) {
+ fallthrough;
case step_A:
if (plainchar == plaintextend) {
state_in->result = result;
@@ -51,7 +53,7 @@ int base64_encode_block(const char *plaintext_in, int length_in, char *code_out,
result = (fragment & 0x0fc) >> 2;
*codechar++ = base64_encode_value(result);
result = (fragment & 0x003) << 4;
- /* fall through */
+ fallthrough;
case step_B:
if (plainchar == plaintextend) {
state_in->result = result;
@@ -62,7 +64,7 @@ int base64_encode_block(const char *plaintext_in, int length_in, char *code_out,
result |= (fragment & 0x0f0) >> 4;
*codechar++ = base64_encode_value(result);
result = (fragment & 0x00f) << 2;
- /* fall through */
+ fallthrough;
case step_C:
if (plainchar == plaintextend) {
state_in->result = result;
@@ -146,6 +148,7 @@ int base64_decode_block(const char *code_in, int length_in, char *plaintext_out,
switch (state_in->step) {
while (1) {
+ fallthrough;
case step_a:
do {
if (codec == code_in+length_in) {
@@ -156,7 +159,7 @@ int base64_decode_block(const char *code_in, int length_in, char *plaintext_out,
fragmt = base64_decode_value(*codec++);
} while (fragmt < 0);
*plainc = (fragmt & 0x03f) << 2;
- /* fall through */
+ fallthrough;
case step_b:
do {
if (codec == code_in+length_in) {
@@ -168,7 +171,7 @@ int base64_decode_block(const char *code_in, int length_in, char *plaintext_out,
} while (fragmt < 0);
*plainc++ |= (fragmt & 0x030) >> 4;
*plainc = (fragmt & 0x00f) << 4;
- /* fall through */
+ fallthrough;
case step_c:
do {
if (codec == code_in+length_in) {
@@ -180,7 +183,7 @@ int base64_decode_block(const char *code_in, int length_in, char *plaintext_out,
} while (fragmt < 0);
*plainc++ |= (fragmt & 0x03c) >> 2;
*plainc = (fragmt & 0x003) << 6;
- /* fall through */
+ fallthrough;
case step_d:
do {
if (codec == code_in+length_in) {