Correct typos in libnetworkstats

Fix Typo-Lints in I23aad26d487b4d99e24ffecf79eeef3f8eea664b

Bug: N/A
Test: m
Change-Id: Id9df0a279e7aad048f2c0d7be66dec40e5a8ae8a
This commit is contained in:
Ken Chen 2022-01-23 16:25:34 +08:00
commit cc764a13fa
2 changed files with 4 additions and 4 deletions

View file

@ -40,7 +40,7 @@ namespace bpf {
using base::Result;
// The target map for stats reading should be the inactive map, which is oppsite
// The target map for stats reading should be the inactive map, which is opposite
// from the config value.
static constexpr char const* STATS_MAP_PATH[] = {STATS_MAP_B_PATH, STATS_MAP_A_PATH};
@ -311,7 +311,7 @@ bool operator==(const stats_line& lhs, const stats_line& rhs) {
!strncmp(lhs.iface, rhs.iface, sizeof(lhs.iface)));
}
// True if lhs is smaller then rhs, only compare iface, uid, tag and set.
// True if lhs is smaller than rhs, only compare iface, uid, tag and set.
bool operator<(const stats_line& lhs, const stats_line& rhs) {
int ret = strncmp(lhs.iface, rhs.iface, sizeof(lhs.iface));
if (ret != 0) return ret < 0;

View file

@ -58,7 +58,7 @@ constexpr uint64_t TEST_PACKET1 = 200;
constexpr const char IFACE_NAME1[] = "lo";
constexpr const char IFACE_NAME2[] = "wlan0";
constexpr const char IFACE_NAME3[] = "rmnet_data0";
// A iface name that the size is bigger then IFNAMSIZ
// A iface name that the size is bigger than IFNAMSIZ
constexpr const char LONG_IFACE_NAME[] = "wlanWithALongName";
constexpr const char TRUNCATED_IFACE_NAME[] = "wlanWithALongNa";
constexpr uint32_t IFACE_INDEX1 = 1;
@ -351,7 +351,7 @@ TEST_F(BpfNetworkStatsHelperTest, TestGetStatsWithSkippedIface) {
ASSERT_EQ((unsigned long)2, lines.size());
}
TEST_F(BpfNetworkStatsHelperTest, TestUnkownIfaceError) {
TEST_F(BpfNetworkStatsHelperTest, TestUnknownIfaceError) {
updateIfaceMap(IFACE_NAME1, IFACE_INDEX1);
StatsValue value1 = {
.rxPackets = TEST_PACKET0,