diff --git a/CHANGES b/CHANGES index 3026314161..da005a0122 100644 --- a/CHANGES +++ b/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 * Avoid reporting paths repeatedly in zeek-config --include_dir (Christian Kreibich, Corelight) diff --git a/VERSION b/VERSION index a4ce34900d..d8d162473c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.1.0-dev.277 +4.1.0-dev.284 diff --git a/src/threading/SerialTypes.h b/src/threading/SerialTypes.h index 49fc113204..fe7970ead1 100644 --- a/src/threading/SerialTypes.h +++ b/src/threading/SerialTypes.h @@ -29,16 +29,16 @@ struct Field { * Constructor. */ Field(const char* name, const char* secondary_name, TypeTag type, TypeTag subtype, bool optional) - : name(name ? util::copy_string(name) : nullptr), - secondary_name(secondary_name ? util::copy_string(secondary_name) : nullptr), + : name(util::copy_string(name)), + secondary_name(util::copy_string(secondary_name)), type(type), subtype(subtype), optional(optional) { } /** * Copy constructor. */ Field(const Field& other) - : name(other.name ? util::copy_string(other.name) : nullptr), - secondary_name(other.secondary_name ? util::copy_string(other.secondary_name) : nullptr), + : name(util::copy_string(other.name)), + secondary_name(util::copy_string(other.secondary_name)), type(other.type), subtype(other.subtype), optional(other.optional) { } ~Field() @@ -53,8 +53,8 @@ struct Field { { delete [] name; delete [] secondary_name; - name = other.name ? util::copy_string(other.name) : nullptr; - secondary_name = other.secondary_name ? util::copy_string(other.secondary_name) : nullptr; + name = util::copy_string(other.name); + secondary_name = util::copy_string(other.secondary_name); type = other.type; subtype = other.subtype; optional = other.optional;