From 103b3818743fb7813979a26d2bfca13a065a5b27 Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Sat, 14 Jan 2023 16:29:14 -0700 Subject: [PATCH] Fix a few minor int pointer value initializations --- src/List.cc | 6 +++--- src/Stmt.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/List.cc b/src/List.cc index 05c27ccc0a..817dafcdf8 100644 --- a/src/List.cc +++ b/src/List.cc @@ -100,9 +100,9 @@ TEST_CASE("list iteration") TEST_CASE("plists") { zeek::PList list; - list.push_back(new int(1)); - list.push_back(new int(2)); - list.push_back(new int(3)); + list.push_back(new int{1}); + list.push_back(new int{2}); + list.push_back(new int{3}); CHECK(*list[0] == 1); diff --git a/src/Stmt.cc b/src/Stmt.cc index 4618904de8..a7ec24836d 100644 --- a/src/Stmt.cc +++ b/src/Stmt.cc @@ -883,7 +883,7 @@ bool SwitchStmt::AddCaseLabelValueMapping(const Val* v, int idx) return false; case_label_value_map[v] = idx; - case_label_hash_map.Insert(hk.get(), new int(idx)); + case_label_hash_map.Insert(hk.get(), new int{idx}); return true; }