[vlc-devel] commit: Do not exit with VLC error codes ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Aug 2 18:57:14 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Aug 2 19:54:19 2009 +0300| [bb5bc9b0f5f2cdca87be3e81a0f48b633bb20601] | committer: Rémi Denis-Courmont
Do not exit with VLC error codes
exit() cannot return negative numbers (the high-order bits are ignored).
And anyway, that's not a meanigful place for VLC error codes. It is also
questionable whether we should exit() from LibVLC anyway...
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bb5bc9b0f5f2cdca87be3e81a0f48b633bb20601
---
src/libvlc.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/libvlc.c b/src/libvlc.c
index 415d9d9..decd51f 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -641,7 +641,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
{
msg_Err( p_libvlc, "D-Bus problem" );
system_End( p_libvlc );
- exit( VLC_ETIMEOUT );
+ exit( 1 );
}
/* append MRLs */
@@ -651,7 +651,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
{
dbus_message_unref( p_dbus_msg );
system_End( p_libvlc );
- exit( VLC_ENOMEM );
+ exit( 1 );
}
b_play = TRUE;
if( config_GetInt( p_libvlc, "playlist-enqueue" ) > 0 )
@@ -661,7 +661,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
{
dbus_message_unref( p_dbus_msg );
system_End( p_libvlc );
- exit( VLC_ENOMEM );
+ exit( 1 );
}
/* send message and get a handle for a reply */
@@ -671,7 +671,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
msg_Err( p_libvlc, "D-Bus problem" );
dbus_message_unref( p_dbus_msg );
system_End( p_libvlc );
- exit( VLC_ETIMEOUT );
+ exit( 1 );
}
if ( NULL == p_dbus_pending )
@@ -679,7 +679,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
msg_Err( p_libvlc, "D-Bus problem" );
dbus_message_unref( p_dbus_msg );
system_End( p_libvlc );
- exit( VLC_ETIMEOUT );
+ exit( 1 );
}
dbus_connection_flush( p_conn );
dbus_message_unref( p_dbus_msg );
@@ -690,7 +690,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
/* bye bye */
system_End( p_libvlc );
- exit( VLC_SUCCESS );
+ exit( 0 );
}
}
/* we unreference the connection when we've finished with it */
More information about the vlc-devel
mailing list