X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fctf-writer%2Ffields.h;h=ecf7e914c85e5994a0c18d1442b59be624d715be;hp=87063fe20bd278a479fb6057cbf0ddb982985cc7;hb=5084732e40a7925d22f741e4ed08f19d36078fbe;hpb=cd1ef6f2860c2b6bf3c22ee984347029c31ac827 diff --git a/src/ctf-writer/fields.h b/src/ctf-writer/fields.h index 87063fe2..ecf7e914 100644 --- a/src/ctf-writer/fields.h +++ b/src/ctf-writer/fields.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);