Commit 8debedbc authored by Ilya Lipnitskiy's avatar Ilya Lipnitskiy

test-generated-code2.c: Don't call memcmp with a NULL pointer

parent e2d45cbe
......@@ -96,6 +96,8 @@ binary_data_equals (ProtobufCBinaryData a, ProtobufCBinaryData b)
{
if (a.len != b.len)
return 0;
if (a.len == 0 && b.len == 0)
return 1;
return memcmp (a.data, b.data, a.len) == 0;
}
......
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