diff libmpcodecs/vf_screenshot.c @ 36751:ca939d7e25be

Use sizeof instead of hardcoded number.
author reimar
date Sun, 16 Feb 2014 14:01:21 +0000
parents 8a1186284090
children af146b0d33f0
line wrap: on
line diff
--- a/libmpcodecs/vf_screenshot.c	Sun Feb 16 14:01:20 2014 +0000
+++ b/libmpcodecs/vf_screenshot.c	Sun Feb 16 14:01:21 2014 +0000
@@ -130,7 +130,7 @@
 static void gen_fname(struct vf_priv_s* priv)
 {
     do {
-        snprintf (priv->fname, 100, "shot%04d.png", ++priv->frameno);
+        snprintf(priv->fname, sizeof(priv->fname), "shot%04d.png", ++priv->frameno);
     } while (fexists(priv->fname) && priv->frameno < 100000);
     if (fexists(priv->fname)) {
         priv->fname[0] = '\0';