X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Ftypes%2Fstring.c;h=c455f9b2f7758f0bec20924c8232d1dfdc04dec8;hp=002f1b4fb335f5bb34d776fa79d36b5f9bf83c35;hb=5ea98697b9f786ac73fd5152d96aebe02906a10d;hpb=001edcbe6676b9ed2de88b5772877c7d91669851 diff --git a/formats/ctf/types/string.c b/formats/ctf/types/string.c index 002f1b4f..c455f9b2 100644 --- a/formats/ctf/types/string.c +++ b/formats/ctf/types/string.c @@ -29,7 +29,7 @@ #include #include #include /* C99 limits */ -#include +#include int ctf_string_read(struct bt_stream_pos *ppos, struct bt_definition *definition) { @@ -53,7 +53,7 @@ int ctf_string_read(struct bt_stream_pos *ppos, struct bt_definition *definition if (max_len_bits < 0) return -EFAULT; /* Add \0, counting in bytes. */ - len = strnlen(srcaddr, (size_t) max_len_bits / CHAR_BIT) + 1; + len = bt_strnlen(srcaddr, (size_t) max_len_bits / CHAR_BIT) + 1; /* Truncated string, unexpected. Trace probably corrupted. */ if (srcaddr[len - 1] != '\0') return -EFAULT;