comparison common.h @ 1332:018ebc066952 libavcodec

fix CHECKED_ALLOCZ(0)
author michaelni
date Sat, 28 Jun 2003 22:51:42 +0000
parents 37176fafe11e
children d413f9a20214
comparison
equal deleted inserted replaced
1331:cf65e69400ec 1332:018ebc066952
1127 #define realloc please_use_av_realloc 1127 #define realloc please_use_av_realloc
1128 1128
1129 #define CHECKED_ALLOCZ(p, size)\ 1129 #define CHECKED_ALLOCZ(p, size)\
1130 {\ 1130 {\
1131 p= av_mallocz(size);\ 1131 p= av_mallocz(size);\
1132 if(p==NULL){\ 1132 if(p==NULL && (size)!=0){\
1133 perror("malloc");\ 1133 perror("malloc");\
1134 goto fail;\ 1134 goto fail;\
1135 }\ 1135 }\
1136 } 1136 }
1137 1137