Reordered base64_encodedstate members by size, reordered assignments to state struct by member order

This commit is contained in:
Jordan Cristiano 2015-06-21 01:29:00 -04:00
parent a4220df30c
commit b10aa30f9b
2 changed files with 5 additions and 5 deletions

View File

@ -22,8 +22,8 @@ typedef struct
{
base64_encodeflags flags;
base64_encodestep step;
char result;
int stepcount;
char result;
} base64_encodestate;
void base64_init_encodestate(base64_encodestate* state_in);

View File

@ -13,8 +13,8 @@ void base64_init_encodestate(base64_encodestate* state_in)
{
state_in->flags = 0;
state_in->step = step_A;
state_in->result = 0;
state_in->stepcount = 0;
state_in->result = 0;
}
char base64_encode_value(char value_in)
@ -41,8 +41,8 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
case step_A:
if (plainchar == plaintextend)
{
state_in->result = result;
state_in->step = step_A;
state_in->result = result;
return codechar - code_out;
}
fragment = *plainchar++;
@ -52,8 +52,8 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
case step_B:
if (plainchar == plaintextend)
{
state_in->result = result;
state_in->step = step_B;
state_in->result = result;
return codechar - code_out;
}
fragment = *plainchar++;
@ -63,8 +63,8 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
case step_C:
if (plainchar == plaintextend)
{
state_in->result = result;
state_in->step = step_C;
state_in->result = result;
return codechar - code_out;
}
fragment = *plainchar++;