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

Can Wu git at videolan.org
Mon Jul 18 14:34:56 CEST 2011


vlc | branch: master | Can Wu <wu.canus at gmail.com> | Mon Jul 18 13:11:25 2011 +0800| [956ce11e844ccd4083c79ae52b9c472c07a857ef] | committer: Rafaël Carré

vo: don't call strlen() on same string once again in postprocessing

Signed-off-by: Rafaël Carré <rafael.carre at gmail.com>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=956ce11e844ccd4083c79ae52b9c472c07a857ef
---

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



More information about the vlc-commits mailing list