From 79b1b57045e86d9845e352c3f2aa0efbab6111a9 Mon Sep 17 00:00:00 2001
From: gcontini <1121667+gcontini@users.noreply.github.com>
Date: 周六, 14 3月 2020 10:19:09 +0800
Subject: [PATCH] tests and improvements

---
 src/library/hw_identifier/ethernet.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/library/hw_identifier/ethernet.cpp b/src/library/hw_identifier/ethernet.cpp
index ce1d6de..bd21bc9 100644
--- a/src/library/hw_identifier/ethernet.cpp
+++ b/src/library/hw_identifier/ethernet.cpp
@@ -63,7 +63,7 @@
 	FUNCTION_RETURN result = generate_ethernet_pc_id(data, use_ip);
 	vector<HwIdentifier> identifiers;
 	if (result == FUNC_RET_OK) {
-		identifiers.resize(data.size());
+		identifiers.reserve(data.size());
 		for (auto &it : data) {
 			HwIdentifier pc_id;
 			pc_id.set_identification_strategy(identification_strategy());

--
Gitblit v1.9.1