Skip to content

Commit 30da9c1

Browse files
author
Mirela Chirica
committed
Cellular: Fix cellular util unit test
1 parent 983425e commit 30da9c1

File tree

1 file changed

+2
-2
lines changed
  • UNITTESTS/features/cellular/framework/common/util

1 file changed

+2
-2
lines changed

UNITTESTS/features/cellular/framework/common/util/utiltest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ TEST_F(Testutil, separate_ip_addresses)
126126
char ip[64] = {0};
127127
char subnet[64] = {0};
128128

129-
strncpy(s, "32.1.20.187.1.112.139.245.251.136.232.110.123.51.230.138.0.1.2.3.4.5.6.7.8.9.10.11.12.13.14.15", 94);
129+
strncpy(s, "32.1.20.187.1.112.139.245.251.136.232.110.123.51.230.138.0.1.2.3.4.5.6.7.8.9.10.11.12.13.14.15\0", 95);
130130
separate_ip_addresses(NULL, ip, sizeof(ip), subnet, sizeof(subnet));
131131

132132
separate_ip_addresses(s, ip, sizeof(ip), subnet, sizeof(subnet));
133133
EXPECT_STREQ("2001:14BB:170:8BF5:FB88:E86E:7B33:E68A", ip);
134134
EXPECT_STREQ("001:203:405:607:809:A0B:C0D:E0F", subnet);
135135

136-
strncpy(s, "32:1:20:187:1:112:139:245:251:136:232:110:123:51:230:138 0:1:2:3:4:5:6:7:8:9:10:11:12:13:14:15", 94);
136+
strncpy(s, "32:1:20:187:1:112:139:245:251:136:232:110:123:51:230:138 0:1:2:3:4:5:6:7:8:9:10:11:12:13:14:15\0", 95);
137137
separate_ip_addresses(s, ip, sizeof(ip), subnet, sizeof(subnet));
138138
EXPECT_STREQ("32:1:20:187:1:112:139:245:251:136:232:110:123:51:230:138", ip);
139139
EXPECT_STREQ("0:1:2:3:4:5:6:7:8:9:10:11:12:13:14:15", subnet);

0 commit comments

Comments
 (0)