[vlc-devel] [PATCH] vo: don't call strlen() on same string once again in postprocessing

Rafaël Carré rafael.carre at gmail.com
Mon Jul 18 14:34:51 CEST 2011


Le Mon, 18 Jul 2011 13:11:25 +0800,
Can Wu <wu.canus at gmail.com> a écrit :

> From: Can Wu <wu.canus at gmail.com>
> To: vlc-devel at videolan.org
> Subject: [vlc-devel] [PATCH] vo: don't call strlen() on same string
> once again in postprocessing Date: Mon, 18 Jul 2011 13:11:25 +0800
> Reply-To: Mailing list for VLC media player developers
> <vlc-devel at videolan.org> Sender: vlc-devel-bounces at videolan.org
> X-Mailer: git-send-email 1.7.3.2.168.gd6b63
> 
> ---
>  src/video_output/postprocessing.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/video_output/postprocessing.c
> b/src/video_output/postprocessing.c index 6c3e98b..7b24ce7 100644
> --- a/src/video_output/postprocessing.c
> +++ b/src/video_output/postprocessing.c
> @@ -36,7 +36,7 @@ static bool PostProcessIsPresent(const char *filter)
>      const char  *pp        = "postproc";
>      const size_t pp_length = strlen(pp);
>      return filter &&
> -           !strncmp(filter, pp, strlen(pp)) &&
> +           !strncmp(filter, pp, pp_length) &&
>             (filter[pp_length] == '\0' || filter[pp_length] == ':');
>  }
>  

applied, thanks

-- 
Rafaël Carré



More information about the vlc-devel mailing list