Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
f6cecfc9
Commit
f6cecfc9
authored
Sep 04, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not use obsolescent ctime(_r)
Use strftime() and localtime_r() instead.
parent
6232433c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
16 deletions
+8
-16
modules/control/http/mvar.c
modules/control/http/mvar.c
+4
-7
src/input/vlmshell.c
src/input/vlmshell.c
+4
-9
No files found.
modules/control/http/mvar.c
View file @
f6cecfc9
...
...
@@ -570,7 +570,7 @@ mvar_t *mvar_FileSetNew( intf_thread_t *p_intf, char *name,
else
#endif
{
char
psz_buf
[
2
6
];
char
psz_buf
[
2
0
];
char
psz_tmp
[
strlen
(
psz_dir
)
+
1
+
strlen
(
psz_name
)
+
1
];
sprintf
(
psz_tmp
,
"%s"
DIR_SEP
"%s"
,
psz_dir
,
psz_name
);
...
...
@@ -596,13 +596,10 @@ mvar_t *mvar_FileSetNew( intf_thread_t *p_intf, char *name,
mvar_AppendNewVar
(
f
,
"size"
,
psz_buf
);
/* FIXME memory leak FIXME */
# ifdef HAVE_CTIME_R
ctime_r
(
&
stat_info
.
st_mtime
,
psz_buf
);
struct
tm
tm
;
strftime
(
psz_buf
,
sizeof
(
psz_buf
),
"%F %H:%M:%S"
,
localtime_r
(
&
stat_info
.
st_mtime
,
&
tm
)
);
mvar_AppendNewVar
(
f
,
"date"
,
psz_buf
);
# else
mvar_AppendNewVar
(
f
,
"date"
,
ctime
(
&
stat_info
.
st_mtime
)
);
# endif
#else
mvar_AppendNewVar
(
f
,
"type"
,
"unknown"
);
mvar_AppendNewVar
(
f
,
"size"
,
"unknown"
);
...
...
src/input/vlmshell.c
View file @
f6cecfc9
...
...
@@ -1530,18 +1530,13 @@ static vlm_message_t *vlm_Show( vlm_t *vlm, vlm_media_sys_t *media,
if
(
i_next_date
>
i_time
)
{
time_t
i_date
=
(
time_t
)
(
i_next_date
/
1000000
)
;
struct
tm
tm
;
char
psz_date
[
32
];
#if !defined( UNDER_CE )
#ifdef HAVE_CTIME_R
char
psz_date
[
500
];
ctime_r
(
&
i_date
,
psz_date
);
#else
char
*
psz_date
=
ctime
(
&
i_date
);
#endif
strftime
(
psz_date
,
sizeof
(
psz_date
),
"%F %H:%M:%S (%a)"
,
localtime_r
(
&
i_date
,
&
tm
)
);
vlm_MessageAdd
(
msg_schedule
,
vlm_MessageNew
(
"next launch"
,
"%s"
,
psz_date
)
);
#endif
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment