[libbluray-devel] commit: Simplified X_FREE(). No need to check if pointer is NULL. (hpi1 )
git at videolan.org
git at videolan.org
Fri Aug 20 10:28:11 CEST 2010
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Aug 20 11:26:23 2010 +0300| [8be519d2c2c3986fef5ab5b9eb93742cfe9749ca] | committer: hpi1
Simplified X_FREE(). No need to check if pointer is NULL.
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=8be519d2c2c3986fef5ab5b9eb93742cfe9749ca
---
src/util/macro.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/util/macro.h b/src/util/macro.h
index 89c90a7..81a08e3 100644
--- a/src/util/macro.h
+++ b/src/util/macro.h
@@ -28,6 +28,6 @@
#define MKINT_BE16(X) ( (X)[0] << 8 | (X)[1] )
#define MKINT_BE24(X) ( (X)[0] << 16 | (X)[1] << 8 | (X)[2] )
#define MKINT_BE32(X) ( (X)[0] << 24 | (X)[1] << 16 | (X)[2] << 8 | (X)[3] )
-#define X_FREE(X) do { if (X) free(X); X = NULL; } while(0)
+#define X_FREE(X) ( free(X), X = NULL )
#endif /* MACRO_H_ */
More information about the libbluray-devel
mailing list