[PATCH 1/3] Make av_strerror() return -1 even in the case when av_strerror_r() is not defined.
Stefano Sabatini
stefano.sabatini-lala
Mon May 3 23:28:01 CEST 2010
---
libavutil/error.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libavutil/error.c b/libavutil/error.c
index 3dd38a3..cb9a73c 100644
--- a/libavutil/error.c
+++ b/libavutil/error.c
@@ -34,10 +34,11 @@ int av_strerror(int errnum, char *errbuf, size_t errbuf_size)
if (errstr) {
av_strlcpy(errbuf, errstr, errbuf_size);
} else {
+ ret = -1;
#if HAVE_STRERROR_R
ret = strerror_r(AVUNERROR(errnum), errbuf, errbuf_size);
#endif
- if (!HAVE_STRERROR_R || ret < 0)
+ if (ret < 0)
snprintf(errbuf, errbuf_size, "Error number %d occurred", errnum);
}
--
1.7.0
--J2SCkAp4GZ/dPZZf
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="0002-Make-print_error-use-strerror-in-case-av_strerror-fa.patch"
More information about the ffmpeg-devel
mailing list