[FFmpeg-devel] [PATCH] avutil/qsort: use do while form for AV_QSORT
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Fri Oct 23 04:53:10 CEST 2015
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
libavutil/qsort.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavutil/qsort.h b/libavutil/qsort.h
index 30edcc8..f079661 100644
--- a/libavutil/qsort.h
+++ b/libavutil/qsort.h
@@ -27,7 +27,7 @@
* to construct input that requires O(n^2) time but this is very unlikely to
* happen with non constructed input.
*/
-#define AV_QSORT(p, num, type, cmp) {\
+#define AV_QSORT(p, num, type, cmp) do { \
void *stack[64][2];\
int sp= 1;\
stack[0][0] = p;\
@@ -89,7 +89,7 @@
}\
}\
}\
-}
+} while (0)
/**
* Merge sort, this sort requires a temporary buffer and is stable, its worst
--
2.6.2
More information about the ffmpeg-devel
mailing list