X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=src%2Fctf-writer%2Ffields.h;h=ecf7e914c85e5994a0c18d1442b59be624d715be;hb=c734aa5344787c7019c55521d1007911552a830c;hp=b2284996d68dd4bcc99a5d9d1cf2804152e08d49;hpb=d72796707133652f331ebae9e4dbe25e5b998a06;p=babeltrace.git diff --git a/src/ctf-writer/fields.h b/src/ctf-writer/fields.h index b2284996..ecf7e914 100644 --- a/src/ctf-writer/fields.h +++ b/src/ctf-writer/fields.h @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include "common/macros.h" @@ -650,7 +650,7 @@ int bt_ctf_field_common_string_append_len(struct bt_ctf_field_common *field, BT_CTF_FIELD_TYPE_ID_STRING, "Field"); /* Make sure no null bytes are appended */ - BT_CTF_ASSERT_PRE(memchr(value, '\0', length) == NULL, + BT_CTF_ASSERT_PRE(!memchr(value, '\0', length), "String value to append contains a null character: " "partial-value=\"%.32s\", length=%u", value, length);