[MPlayer-dev-eng] [PATCH] Inlining realloc_struct
Zuxy Meng
zuxy.meng at gmail.com
Wed May 30 10:55:10 CEST 2007
Hi,
2007/3/2, Zuxy Meng <zuxy.meng at gmail.com>:
> Hi,
>
> I guess functions in header files should be in inline?
If nobody disagrees I plan to apply the attached patch this weekend.
All functions defined in demuxer.h is both static and inline, as this
is a header that is to be included multiple times.
--
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
-------------- next part --------------
Index: libmpdemux/demuxer.h
===================================================================
--- libmpdemux/demuxer.h ?????? 23404??
+++ libmpdemux/demuxer.h ????????????
@@ -275,7 +275,7 @@
#define SIZE_MAX ((size_t)-1)
#endif
-static void *realloc_struct(void *ptr, size_t nmemb, size_t size) {
+inline static void *realloc_struct(void *ptr, size_t nmemb, size_t size) {
if (nmemb > SIZE_MAX / size) {
free(ptr);
return NULL;
More information about the MPlayer-dev-eng
mailing list