chunk: Print chunks without separator if + modifier is used
This commit is contained in:
committed by
Andreas Steffen
parent
32a145fdbd
commit
f0c54e8c15
@@ -797,7 +797,7 @@ int chunk_printf_hook(printf_hook_data_t *data, printf_hook_spec_t *spec,
|
||||
chunk_t copy = *chunk;
|
||||
int written = 0;
|
||||
|
||||
if (!spec->hash)
|
||||
if (!spec->hash && !spec->plus)
|
||||
{
|
||||
u_int chunk_len = chunk->len;
|
||||
const void *new_args[] = {&chunk->ptr, &chunk_len};
|
||||
@@ -810,7 +810,7 @@ int chunk_printf_hook(printf_hook_data_t *data, printf_hook_spec_t *spec,
|
||||
{
|
||||
first = FALSE;
|
||||
}
|
||||
else
|
||||
else if (!spec->plus)
|
||||
{
|
||||
written += print_in_hook(data, ":");
|
||||
}
|
||||
|
||||
@@ -368,6 +368,7 @@ u_int64_t chunk_mac(chunk_t chunk, u_char *key);
|
||||
* Arguments are:
|
||||
* chunk_t *chunk
|
||||
* Use #-modifier to print a compact version
|
||||
* Use +-modifier to print a compact version without separator
|
||||
*/
|
||||
int chunk_printf_hook(printf_hook_data_t *data, printf_hook_spec_t *spec,
|
||||
const void *const *args);
|
||||
|
||||
Reference in New Issue
Block a user