From: Tobias Brunner Date: Wed, 23 Nov 2011 14:30:41 +0000 (+0100) Subject: Removed redundant '=>' when logging binary data in parser and generator. X-Git-Tag: 5.0.0~338^2~9^2~397 X-Git-Url: https://git.strongswan.org/?p=strongswan.git;a=commitdiff_plain;h=97265a8927c290466eb8899d99da9b3cf921969f Removed redundant '=>' when logging binary data in parser and generator. --- diff --git a/src/libcharon/encoding/generator.c b/src/libcharon/encoding/generator.c index 2c9298e..0776482 100644 --- a/src/libcharon/encoding/generator.c +++ b/src/libcharon/encoding/generator.c @@ -311,14 +311,14 @@ static void generate_u_int_type(private_generator_t *this, case CONFIGURATION_ATTRIBUTE_LENGTH: { u_int16_t val = htons(*((u_int16_t*)(this->data_struct + offset))); - DBG3(DBG_ENC, " => %b", &val, sizeof(u_int16_t)); + DBG3(DBG_ENC, " %b", &val, sizeof(u_int16_t)); write_bytes_to_buffer(this, &val, sizeof(u_int16_t)); break; } case U_INT_32: { u_int32_t val = htonl(*((u_int32_t*)(this->data_struct + offset))); - DBG3(DBG_ENC, " => %b", &val, sizeof(u_int32_t)); + DBG3(DBG_ENC, " %b", &val, sizeof(u_int32_t)); write_bytes_to_buffer(this, &val, sizeof(u_int32_t)); break; } @@ -327,7 +327,7 @@ static void generate_u_int_type(private_generator_t *this, /* 64 bit are written as-is, no host order conversion */ write_bytes_to_buffer(this, this->data_struct + offset, sizeof(u_int64_t)); - DBG3(DBG_ENC, " => %b", this->data_struct + offset, + DBG3(DBG_ENC, " %b", this->data_struct + offset, sizeof(u_int64_t)); break; } @@ -385,7 +385,7 @@ static void generate_from_chunk(private_generator_t *this, u_int32_t offset) } value = (chunk_t *)(this->data_struct + offset); - DBG3(DBG_ENC, " => %B", value); + DBG3(DBG_ENC, " %B", value); write_bytes_to_buffer(this, value->ptr, value->len); } diff --git a/src/libcharon/encoding/parser.c b/src/libcharon/encoding/parser.c index b93651b..3f4bb15 100644 --- a/src/libcharon/encoding/parser.c +++ b/src/libcharon/encoding/parser.c @@ -254,7 +254,7 @@ static bool parse_bytes(private_parser_t *this, int rule_number, if (output_pos) { memcpy(output_pos, this->byte_pos, bytes); - DBG3(DBG_ENC, " => %b", output_pos, bytes); + DBG3(DBG_ENC, " %b", output_pos, bytes); } this->byte_pos += bytes; return TRUE; @@ -352,7 +352,7 @@ static bool parse_chunk(private_parser_t *this, int rule_number, { *output_pos = chunk_alloc(length); memcpy(output_pos->ptr, this->byte_pos, length); - DBG3(DBG_ENC, " => %b", output_pos->ptr, length); + DBG3(DBG_ENC, " %b", output_pos->ptr, length); } this->byte_pos += length; return TRUE;