[vlc-commits] Rationalize error code values

Rémi Denis-Courmont git at videolan.org
Tue Dec 4 22:18:58 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Dec  4 23:17:48 2012 +0200| [7387c6d3bd9723cf50cac9ddea6a6388884df47e] | committer: Rémi Denis-Courmont

Rationalize error code values

VLC_GENERIC was particularly bad for RISC processors.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7387c6d3bd9723cf50cac9ddea6a6388884df47e
---

 include/vlc_common.h |   23 +++++++++--------------
 1 file changed, 9 insertions(+), 14 deletions(-)

diff --git a/include/vlc_common.h b/include/vlc_common.h
index 90d0173..1ef288c 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -393,20 +393,15 @@ struct vlc_list_t
 /*****************************************************************************
  * Error values (shouldn't be exposed)
  *****************************************************************************/
-#define VLC_SUCCESS         -0                                   /* No error */
-#define VLC_ENOMEM          -1                          /* Not enough memory */
-#define VLC_ETIMEOUT        -3                                    /* Timeout */
-
-#define VLC_ENOMOD         -10                           /* Module not found */
-
-#define VLC_ENOOBJ         -20                           /* Object not found */
-
-#define VLC_ENOVAR         -30                         /* Variable not found */
-#define VLC_EBADVAR        -31                         /* Bad variable value */
-
-#define VLC_ENOITEM        -40                           /**< Item not found */
-
-#define VLC_EGENERIC      -666                              /* Generic error */
+#define VLC_SUCCESS        (-0) /**< No error */
+#define VLC_EGENERIC       (-1) /**< Unspecified error */
+#define VLC_ENOMEM         (-2) /**< Not enough memory */
+#define VLC_ETIMEOUT       (-3) /**< Timeout */
+#define VLC_ENOMOD         (-4) /**< Module not found */
+#define VLC_ENOOBJ         (-5) /**< Object not found */
+#define VLC_ENOVAR         (-6) /**< Variable not found */
+#define VLC_EBADVAR        (-7) /**< Bad variable value */
+#define VLC_ENOITEM        (-8) /**< Item not found */
 
 /*****************************************************************************
  * Variable callbacks



More information about the vlc-commits mailing list