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

Can Wu wu.canus at gmail.com
Mon Jul 18 07:11:25 CEST 2011


---
 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] == ':');
 }
 
-- 
1.7.3.2.168.gd6b63




More information about the vlc-devel mailing list