[vlc-devel] [PATCH] core/input: removed useless branching "protecting" free
Filip Roséen
filip at videolabs.io
Sun Jun 5 17:00:38 CEST 2016
--
Yes, I deserve to be made fun of for introducing that silly if. To compensate
(and try to save my dignity in a somewhat weird manner), here is some
(ascii)art:
."";._ _.---._ _.-"".
/_.'_ '-' /`-` \_ \
.' / `\ \ /` \ '.
.' / ; _ _ '-; \ ;'.
_.' ; /\ / \ \ \ ; '._;._
.-'.--. | / | \0|0/ \ | '-.
/ /` \ | / .' \ | .---. \
| | | / /--' .-"""-. \ \/ \ |
\ \ / / / ( , , ) /\ \ | /
\ '----' .' | '-(_)-' | | '. / /
`'----'` | '. | `'----'`
\ `/
'. , .'
`-.____.' '.____.-'
\ /
'-'
---
src/input/input.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index 3592bf2..22958fd 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -432,8 +432,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
*psz_end = 0;
if( !strncmp( psz_start, "name=", 5 ) )
{
- if( p_seekpoint->psz_name )
- free( p_seekpoint->psz_name );
+ free( p_seekpoint->psz_name );
p_seekpoint->psz_name = strdup(psz_start + 5);
}
--
2.8.3
More information about the vlc-devel
mailing list