Commit ec300ad9 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

fix variable name - closes #1629

parent 260c3894
...@@ -579,7 +579,7 @@ mvar_t *mvar_FileSetNew( intf_thread_t *p_intf, char *name, ...@@ -579,7 +579,7 @@ mvar_t *mvar_FileSetNew( intf_thread_t *p_intf, char *name,
else else
#endif #endif
{ {
char psz_ctime[26]; char psz_buf[26];
char psz_tmp[strlen( psz_dir ) + 1 + strlen( psz_name ) + 1]; char psz_tmp[strlen( psz_dir ) + 1 + strlen( psz_name ) + 1];
sprintf( psz_tmp, "%s"DIR_SEP"%s", psz_dir, psz_name ); sprintf( psz_tmp, "%s"DIR_SEP"%s", psz_dir, psz_name );
...@@ -600,13 +600,14 @@ mvar_t *mvar_FileSetNew( intf_thread_t *p_intf, char *name, ...@@ -600,13 +600,14 @@ mvar_t *mvar_FileSetNew( intf_thread_t *p_intf, char *name,
mvar_AppendNewVar( f, "type", "unknown" ); mvar_AppendNewVar( f, "type", "unknown" );
} }
sprintf( psz_ctime, "%"PRId64, (int64_t)stat_info.st_size ); snprintf( psz_buf, sizeof( psz_buf ), "%"PRId64,
mvar_AppendNewVar( f, "size", psz_ctime ); (int64_t)stat_info.st_size );
mvar_AppendNewVar( f, "size", psz_buf );
/* FIXME memory leak FIXME */ /* FIXME memory leak FIXME */
# ifdef HAVE_CTIME_R # ifdef HAVE_CTIME_R
ctime_r( &stat_info.st_mtime, psz_ctime ); ctime_r( &stat_info.st_mtime, psz_buf );
mvar_AppendNewVar( f, "date", psz_ctime ); mvar_AppendNewVar( f, "date", psz_buf );
# else # else
mvar_AppendNewVar( f, "date", ctime( &stat_info.st_mtime ) ); mvar_AppendNewVar( f, "date", ctime( &stat_info.st_mtime ) );
# endif # endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment