mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge branch 'misc_cleanup' of https://github.com/MaxKellermann/zeek
- 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:
commit
e2e90ac477
3 changed files with 4 additions and 24 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue