[MPlayer-cvslog] r36847 - trunk/libmpcodecs/vf_screenshot.c
reimar
subversion at mplayerhq.hu
Sun Feb 16 15:01:21 CET 2014
Author: reimar
Date: Sun Feb 16 15:01:21 2014
New Revision: 36847
Log:
Use sizeof instead of hardcoded number.
Modified:
trunk/libmpcodecs/vf_screenshot.c
Modified: trunk/libmpcodecs/vf_screenshot.c
==============================================================================
--- trunk/libmpcodecs/vf_screenshot.c Sun Feb 16 15:01:20 2014 (r36846)
+++ trunk/libmpcodecs/vf_screenshot.c Sun Feb 16 15:01:21 2014 (r36847)
@@ -130,7 +130,7 @@ static int fexists(char *fname)
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';
More information about the MPlayer-cvslog
mailing list