for (int i = 0; i < (int) decoded.size(); i++) {
// compare all the buffers with their original
- ok |= strncmp(decoded[i].c_str(), enc[i].c_str(), length);
+ ok |= memcmp(decoded[i].c_str(), enc[i].c_str(), length);
}
return ok;
unsigned length = encoded[0].length();
for (int i = 0; i < k; i++) {
- EXPECT_EQ(0, strncmp(encoded[i].c_str(), in.c_str() + (i * length), length));
+ EXPECT_EQ(0, memcmp(encoded[i].c_str(), in.c_str() + (i * length), length));
}
buffer::ptr enc[k + m];
unsigned length = encoded[0].length();
for (int i = 0; i < k; i++) {
- EXPECT_EQ(0, strncmp(encoded[i].c_str(), in.c_str() + (i * length), length));
+ EXPECT_EQ(0, memcmp(encoded[i].c_str(), in.c_str() + (i * length), length));
}
buffer::ptr enc[k + m];
unsigned length = encoded[0].length();
for (int i = 0; i < k; i++) {
- EXPECT_EQ(0, strncmp(encoded[i].c_str(), in.c_str() + (i * length), length));
+ EXPECT_EQ(0, memcmp(encoded[i].c_str(), in.c_str() + (i * length), length));
}
buffer::ptr enc[k + m];
unsigned length = encoded[0].length();
for (int i = 0; i < k; i++) {
- EXPECT_EQ(0, strncmp(encoded[i].c_str(), in.c_str() + (i * length), length));
+ EXPECT_EQ(0, memcmp(encoded[i].c_str(), in.c_str() + (i * length), length));
}
buffer::ptr enc[k + m];