aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zbee-security.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-zbee-security.c')
-rw-r--r--epan/dissectors/packet-zbee-security.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/epan/dissectors/packet-zbee-security.c b/epan/dissectors/packet-zbee-security.c
index f9ffbb4990..be76a862d2 100644
--- a/epan/dissectors/packet-zbee-security.c
+++ b/epan/dissectors/packet-zbee-security.c
@@ -139,18 +139,8 @@ static void* uat_key_record_copy_cb(void* n, const void* o, size_t siz _U_) {
uat_key_record_t* new_key = (uat_key_record_t *)n;
const uat_key_record_t* old_key = (const uat_key_record_t *)o;
- if (old_key->string) {
- new_key->string = g_strdup(old_key->string);
- } else {
- new_key->string = NULL;
- }
-
- if (old_key->label) {
- new_key->label = g_strdup(old_key->label);
- } else {
- new_key->label = NULL;
- }
-
+ new_key->string = g_strdup(old_key->string);
+ new_key->label = g_strdup(old_key->label);
new_key->byte_order = old_key->byte_order;
return new_key;
@@ -184,8 +174,8 @@ static gboolean uat_key_record_update_cb(void* r, char** err) {
static void uat_key_record_free_cb(void*r) {
uat_key_record_t* key = (uat_key_record_t *)r;
- if (key->string) g_free(key->string);
- if (key->label) g_free(key->label);
+ g_free(key->string);
+ g_free(key->label);
}
static void uat_key_record_post_update(void) {