# HG changeset patch # User reimar # Date 1392559281 0 # Node ID ca939d7e25beb23711b7b1e784779a4906641af7 # Parent 8a1186284090ab65b142e938dc692ffb279f6c63 Use sizeof instead of hardcoded number. diff -r 8a1186284090 -r ca939d7e25be libmpcodecs/vf_screenshot.c --- 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';