Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
ce572d7e
Commit
ce572d7e
authored
Sep 11, 2007
by
Christophe Mutricy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove always true tests
parent
2e71482d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
src/text/strings.c
src/text/strings.c
+12
-18
No files found.
src/text/strings.c
View file @
ce572d7e
...
@@ -654,8 +654,7 @@ char *str_format_time( const char *tformat )
...
@@ -654,8 +654,7 @@ char *str_format_time( const char *tformat )
}
}
/* same than INSERT_STRING, except that string won't be freed */
/* same than INSERT_STRING, except that string won't be freed */
#define INSERT_STRING_NO_FREE( check, string ) \
#define INSERT_STRING_NO_FREE( string ) \
if( check && string ) \
{ \
{ \
int len = strlen( string ); \
int len = strlen( string ); \
dst = realloc( dst, \
dst = realloc( dst, \
...
@@ -663,11 +662,6 @@ char *str_format_time( const char *tformat )
...
@@ -663,11 +662,6 @@ char *str_format_time( const char *tformat )
strncpy( d, string, len+1 ); \
strncpy( d, string, len+1 ); \
d += len; \
d += len; \
free( string ); \
free( string ); \
} \
else \
{ \
*d = '-'; \
d++; \
}
}
char
*
__str_format_meta
(
vlc_object_t
*
p_object
,
const
char
*
string
)
char
*
__str_format_meta
(
vlc_object_t
*
p_object
,
const
char
*
string
)
{
{
...
@@ -761,7 +755,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
...
@@ -761,7 +755,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
{
{
sprintf
(
buf
,
b_empty_if_na
?
""
:
"-"
);
sprintf
(
buf
,
b_empty_if_na
?
""
:
"-"
);
}
}
INSERT_STRING_NO_FREE
(
1
,
buf
);
INSERT_STRING_NO_FREE
(
buf
);
break
;
break
;
case
'C'
:
case
'C'
:
if
(
p_input
)
if
(
p_input
)
...
@@ -773,7 +767,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
...
@@ -773,7 +767,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
{
{
sprintf
(
buf
,
b_empty_if_na
?
""
:
"-"
);
sprintf
(
buf
,
b_empty_if_na
?
""
:
"-"
);
}
}
INSERT_STRING_NO_FREE
(
1
,
buf
);
INSERT_STRING_NO_FREE
(
buf
);
break
;
break
;
case
'D'
:
case
'D'
:
if
(
p_item
)
if
(
p_item
)
...
@@ -788,7 +782,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
...
@@ -788,7 +782,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
{
{
sprintf
(
buf
,
b_empty_if_na
?
""
:
"--:--:--"
);
sprintf
(
buf
,
b_empty_if_na
?
""
:
"--:--:--"
);
}
}
INSERT_STRING_NO_FREE
(
1
,
buf
);
INSERT_STRING_NO_FREE
(
buf
);
break
;
break
;
case
'F'
:
case
'F'
:
INSERT_STRING
(
p_item
,
input_item_GetURI
(
p_item
)
);
INSERT_STRING
(
p_item
,
input_item_GetURI
(
p_item
)
);
...
@@ -803,7 +797,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
...
@@ -803,7 +797,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
{
{
sprintf
(
buf
,
b_empty_if_na
?
""
:
"-"
);
sprintf
(
buf
,
b_empty_if_na
?
""
:
"-"
);
}
}
INSERT_STRING_NO_FREE
(
1
,
buf
);
INSERT_STRING_NO_FREE
(
buf
);
break
;
break
;
case
'L'
:
case
'L'
:
if
(
p_item
&&
p_input
)
if
(
p_item
&&
p_input
)
...
@@ -819,7 +813,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
...
@@ -819,7 +813,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
{
{
sprintf
(
buf
,
b_empty_if_na
?
""
:
"--:--:--"
);
sprintf
(
buf
,
b_empty_if_na
?
""
:
"--:--:--"
);
}
}
INSERT_STRING_NO_FREE
(
1
,
buf
);
INSERT_STRING_NO_FREE
(
buf
);
break
;
break
;
case
'N'
:
case
'N'
:
INSERT_STRING
(
p_item
,
input_item_GetName
(
p_item
)
);
INSERT_STRING
(
p_item
,
input_item_GetName
(
p_item
)
);
...
@@ -848,7 +842,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
...
@@ -848,7 +842,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
{
{
sprintf
(
buf
,
b_empty_if_na
?
""
:
"--.-%%"
);
sprintf
(
buf
,
b_empty_if_na
?
""
:
"--.-%%"
);
}
}
INSERT_STRING_NO_FREE
(
1
,
buf
);
INSERT_STRING_NO_FREE
(
buf
);
break
;
break
;
case
'R'
:
case
'R'
:
if
(
p_input
)
if
(
p_input
)
...
@@ -860,7 +854,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
...
@@ -860,7 +854,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
{
{
sprintf
(
buf
,
b_empty_if_na
?
""
:
"-"
);
sprintf
(
buf
,
b_empty_if_na
?
""
:
"-"
);
}
}
INSERT_STRING_NO_FREE
(
1
,
buf
);
INSERT_STRING_NO_FREE
(
buf
);
break
;
break
;
case
'S'
:
case
'S'
:
if
(
p_input
)
if
(
p_input
)
...
@@ -872,7 +866,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
...
@@ -872,7 +866,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
{
{
sprintf
(
buf
,
b_empty_if_na
?
""
:
"-"
);
sprintf
(
buf
,
b_empty_if_na
?
""
:
"-"
);
}
}
INSERT_STRING_NO_FREE
(
1
,
buf
);
INSERT_STRING_NO_FREE
(
buf
);
break
;
break
;
case
'T'
:
case
'T'
:
if
(
p_input
)
if
(
p_input
)
...
@@ -886,7 +880,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
...
@@ -886,7 +880,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
{
{
sprintf
(
buf
,
b_empty_if_na
?
""
:
"--:--:--"
);
sprintf
(
buf
,
b_empty_if_na
?
""
:
"--:--:--"
);
}
}
INSERT_STRING_NO_FREE
(
1
,
buf
);
INSERT_STRING_NO_FREE
(
buf
);
break
;
break
;
case
'U'
:
case
'U'
:
INSERT_STRING
(
p_item
,
input_item_GetPublisher
(
p_item
)
);
INSERT_STRING
(
p_item
,
input_item_GetPublisher
(
p_item
)
);
...
@@ -896,7 +890,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
...
@@ -896,7 +890,7 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
audio_volume_t
volume
;
audio_volume_t
volume
;
aout_VolumeGet
(
p_object
,
&
volume
);
aout_VolumeGet
(
p_object
,
&
volume
);
snprintf
(
buf
,
10
,
"%d"
,
volume
);
snprintf
(
buf
,
10
,
"%d"
,
volume
);
INSERT_STRING_NO_FREE
(
1
,
buf
);
INSERT_STRING_NO_FREE
(
buf
);
break
;
break
;
}
}
case
'_'
:
case
'_'
:
...
...
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