Commit 85f77ec8 authored by Max Kellermann's avatar Max Kellermann

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

parent 37debed0
......@@ -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());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment