mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Simplify some copy_string() usages in threading::Field
This commit is contained in:
parent
ff90236df3
commit
6946cffde2
3 changed files with 17 additions and 7 deletions
10
CHANGES
10
CHANGES
|
@ -1,4 +1,14 @@
|
||||||
|
|
||||||
|
4.1.0-dev.284 | 2021-03-05 17:37:03 -0800
|
||||||
|
|
||||||
|
* Simplify some copy_string() usages in threading::Field (Jon Siwek, Corelight)
|
||||||
|
|
||||||
|
* Use const-reference in plugin::Manager::MetaHookPost for minor performance gain (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
|
* Fix missing assigmnent operator/copy constructor pairings reported by LGTM (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
|
* Fix variable shadowing issues reported by LGTM (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
4.1.0-dev.277 | 2021-03-05 16:14:23 -0800
|
4.1.0-dev.277 | 2021-03-05 16:14:23 -0800
|
||||||
|
|
||||||
* Avoid reporting paths repeatedly in zeek-config --include_dir (Christian Kreibich, Corelight)
|
* Avoid reporting paths repeatedly in zeek-config --include_dir (Christian Kreibich, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
4.1.0-dev.277
|
4.1.0-dev.284
|
||||||
|
|
|
@ -29,16 +29,16 @@ struct Field {
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*/
|
*/
|
||||||
Field(const char* name, const char* secondary_name, TypeTag type, TypeTag subtype, bool optional)
|
Field(const char* name, const char* secondary_name, TypeTag type, TypeTag subtype, bool optional)
|
||||||
: name(name ? util::copy_string(name) : nullptr),
|
: name(util::copy_string(name)),
|
||||||
secondary_name(secondary_name ? util::copy_string(secondary_name) : nullptr),
|
secondary_name(util::copy_string(secondary_name)),
|
||||||
type(type), subtype(subtype), optional(optional) { }
|
type(type), subtype(subtype), optional(optional) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy constructor.
|
* Copy constructor.
|
||||||
*/
|
*/
|
||||||
Field(const Field& other)
|
Field(const Field& other)
|
||||||
: name(other.name ? util::copy_string(other.name) : nullptr),
|
: name(util::copy_string(other.name)),
|
||||||
secondary_name(other.secondary_name ? util::copy_string(other.secondary_name) : nullptr),
|
secondary_name(util::copy_string(other.secondary_name)),
|
||||||
type(other.type), subtype(other.subtype), optional(other.optional) { }
|
type(other.type), subtype(other.subtype), optional(other.optional) { }
|
||||||
|
|
||||||
~Field()
|
~Field()
|
||||||
|
@ -53,8 +53,8 @@ struct Field {
|
||||||
{
|
{
|
||||||
delete [] name;
|
delete [] name;
|
||||||
delete [] secondary_name;
|
delete [] secondary_name;
|
||||||
name = other.name ? util::copy_string(other.name) : nullptr;
|
name = util::copy_string(other.name);
|
||||||
secondary_name = other.secondary_name ? util::copy_string(other.secondary_name) : nullptr;
|
secondary_name = util::copy_string(other.secondary_name);
|
||||||
type = other.type;
|
type = other.type;
|
||||||
subtype = other.subtype;
|
subtype = other.subtype;
|
||||||
optional = other.optional;
|
optional = other.optional;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue