Standardize `!ptr` i/o `ptr == NULL`, `ptr` i/o `ptr != NULL`
[babeltrace.git] / src / ctf-writer / fields.h
index 87063fe20bd278a479fb6057cbf0ddb982985cc7..ecf7e914c85e5994a0c18d1442b59be624d715be 100644 (file)
@@ -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);
 
This page took 0.022816 seconds and 4 git commands to generate.