[libav-devel] [PATCH 2/5] avstring: Const correct the return pointers of strstr-like functions

Martin Storsjö martin at martin.st
Mon Aug 3 23:14:40 CEST 2015


On Mon, 3 Aug 2015, Luca Barbato wrote:

> ---
> libavutil/avstring.c | 5 +++--
> libavutil/avstring.h | 5 +++--
> 2 files changed, 6 insertions(+), 4 deletions(-)

This breaks const-correctness when using these functions on non-const 
input data. The standard C functions strstr and similar have the same 
signature as well, taking const pointers, returning a non-const pointer.

// Martin


More information about the libav-devel mailing list