- Minor code formatting change in merge

* 'misc_cleanup' of https://github.com/MaxKellermann/zeek:
  Desc: move realloc() call out of the loop
  SerializationFormat: move realloc() call out of the loop
  PacketDumper: remove unused types
This commit is contained in:
Jon Siwek 2020-01-31 11:16:56 -08:00
commit e2e90ac477
3 changed files with 4 additions and 24 deletions

View file

@ -79,10 +79,9 @@ bool SerializationFormat::WriteData(const void* b, size_t count)
{
// Increase buffer if necessary.
while ( output_pos + count > output_size )
{
output_size *= GROWTH_FACTOR;
output = (char*)safe_realloc(output, output_size);
}
output = (char*)safe_realloc(output, output_size);
memcpy(output + output_pos, b, count);
output_pos += count;