From 4a24608bb3ba2d4a03cf26791751c0cb7ea35a1a Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 2 Aug 2009 19:51:59 +0300 Subject: [PATCH] Replace VLC_ETHREAD with VLCENOMEM. This is consistent with existing practice inside and outside of VLC. We really don't need a separate error code for that. --- include/vlc_common.h | 1 - modules/audio_output/hd1000a.cpp | 2 +- modules/audio_output/oss.c | 2 +- modules/misc/gtk_main.c | 2 +- modules/misc/qte_main.cpp | 2 +- src/misc/error.c | 2 -- 6 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/vlc_common.h b/include/vlc_common.h index 88b938bc42..a70f7efe0f 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -434,7 +434,6 @@ struct vlc_list_t *****************************************************************************/ #define VLC_SUCCESS -0 /* No error */ #define VLC_ENOMEM -1 /* Not enough memory */ -#define VLC_ETHREAD -2 /* Thread error */ #define VLC_ETIMEOUT -3 /* Timeout */ #define VLC_ENOMOD -10 /* Module not found */ diff --git a/modules/audio_output/hd1000a.cpp b/modules/audio_output/hd1000a.cpp index 1b736dabc2..e532dfafd6 100644 --- a/modules/audio_output/hd1000a.cpp +++ b/modules/audio_output/hd1000a.cpp @@ -175,7 +175,7 @@ static int Open( vlc_object_t * p_this ) delete pPlayer; free( p_sys->ppBuffers ); free( p_sys ); - return VLC_ETHREAD; + return VLC_ENOMEM; } return VLC_SUCCESS; diff --git a/modules/audio_output/oss.c b/modules/audio_output/oss.c index 6ee0688655..aca9ec7bfc 100644 --- a/modules/audio_output/oss.c +++ b/modules/audio_output/oss.c @@ -522,7 +522,7 @@ static int Open( vlc_object_t *p_this ) msg_Err( p_aout, "cannot create OSS thread (%m)" ); close( p_sys->i_fd ); free( p_sys ); - return VLC_ETHREAD; + return VLC_ENOMEM; } return VLC_SUCCESS; diff --git a/modules/misc/gtk_main.c b/modules/misc/gtk_main.c index b127e5a8f6..5109515a5b 100644 --- a/modules/misc/gtk_main.c +++ b/modules/misc/gtk_main.c @@ -115,7 +115,7 @@ static int Open( vlc_object_t *p_this ) vlc_object_release( p_gtk_main ); i_refcount--; vlc_mutex_unlock( >k_lock ); - return VLC_ETHREAD; + return VLC_ENOMEM; } i_refcount++; diff --git a/modules/misc/qte_main.cpp b/modules/misc/qte_main.cpp index 05ab4b4290..1153592a3e 100644 --- a/modules/misc/qte_main.cpp +++ b/modules/misc/qte_main.cpp @@ -109,7 +109,7 @@ static int Open( vlc_object_t *p_this ) vlc_object_release( p_qte_main ); i_refcount--; vlc_mutex_unlock( lock ); - return VLC_ETHREAD; + return VLC_ENOMEM; } i_refcount++; diff --git a/src/misc/error.c b/src/misc/error.c index bb982c49d1..a11639e785 100644 --- a/src/misc/error.c +++ b/src/misc/error.c @@ -45,8 +45,6 @@ char const * vlc_error ( int i_err ) case VLC_ENOMEM: return "not enough memory"; - case VLC_ETHREAD: - return "thread error"; case VLC_ETIMEOUT: return "timeout"; -- 2.39.2