[PATCH 1/7] Split AVUNERROR and AVERROR definition. Simplify an incoming patch for dropping AVUNERROR and somehow increase readability.
Stefano Sabatini
stefano.sabatini-lala
Thu Mar 11 00:22:26 CET 2010
---
libavutil/error.h | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/libavutil/error.h b/libavutil/error.h
index a386c1f..4e6a52e 100644
--- a/libavutil/error.h
+++ b/libavutil/error.h
@@ -27,12 +27,18 @@
/* error handling */
#if EINVAL > 0
#define AVERROR(e) (-(e)) /**< Returns a negative error code from a POSIX error code, to return from library functions. */
-#define AVUNERROR(e) (-(e)) /**< Returns a POSIX error code from a library function error return value. */
#else
/* Some platforms have E* and errno already negated. */
#define AVERROR(e) (e)
+#endif
+
+#if EINVAL > 0
+#define AVUNERROR(e) (-(e)) /**< Returns a POSIX error code from a library function error return value. */
+#else
+/* Some platforms have E* and errno already negated. */
#define AVUNERROR(e) (e)
#endif
+
#define AVERROR_UNKNOWN AVERROR(EINVAL) /**< unknown error */
#define AVERROR_IO AVERROR(EIO) /**< I/O error */
#define AVERROR_NUMEXPECTED AVERROR(EDOM) /**< Number syntax expected in filename. */
--
1.6.6.1
--uAKRQypu60I7Lcqm
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="0002-Mark-AVUNERROR-for-deletion-at-the-next-major-bump.patch"
More information about the ffmpeg-devel
mailing list