test/net/TestLocalSocketAddress: can't use strcmp() if the string isn't null-terminated.

This commit is contained in:
Max Kellermann 2019-01-21 12:11:59 +01:00
parent 37debed0b8
commit 85f77ec81d
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ TEST(LocalSocketAddress, Abstract)
EXPECT_EQ(sun.sun_path[0], 0);
/* ... but are not null-terminated */
EXPECT_STREQ(sun.sun_path + 1, path + 1);
EXPECT_EQ(memcmp(sun.sun_path + 1, path + 1, strlen(path) - 1), 0);
EXPECT_EQ(sun.sun_path + strlen(path), (const char *)a.GetAddress() + a.GetSize());
}