Mercurial > libavcodec.hg
comparison utils.c @ 1057:bb5de8a59da8 libavcodec
* static,const,compiler warning cleanup
author | kabi |
---|---|
date | Mon, 10 Feb 2003 09:35:32 +0000 |
parents | 8f440ca8e0b0 |
children | b32afefe7d33 |
comparison
equal
deleted
inserted
replaced
1056:eb403f8158eb | 1057:bb5de8a59da8 |
---|---|
44 } | 44 } |
45 | 45 |
46 /** | 46 /** |
47 * realloc which does nothing if the block is large enough | 47 * realloc which does nothing if the block is large enough |
48 */ | 48 */ |
49 void *av_fast_realloc(void *ptr, int *size, int min_size) | 49 void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size) |
50 { | 50 { |
51 if(min_size < *size) | 51 if(min_size < *size) |
52 return ptr; | 52 return ptr; |
53 | 53 |
54 *size= min_size + 10*1024; | 54 *size= min_size + 10*1024; |
61 static unsigned int last_static = 0; | 61 static unsigned int last_static = 0; |
62 static char*** array_static = NULL; | 62 static char*** array_static = NULL; |
63 static const unsigned int grow_static = 64; // ^2 | 63 static const unsigned int grow_static = 64; // ^2 |
64 void *__av_mallocz_static(void** location, unsigned int size) | 64 void *__av_mallocz_static(void** location, unsigned int size) |
65 { | 65 { |
66 int l = (last_static + grow_static) & ~(grow_static - 1); | 66 unsigned int l = (last_static + grow_static) & ~(grow_static - 1); |
67 void *ptr = av_mallocz(size); | 67 void *ptr = av_mallocz(size); |
68 if (!ptr) | 68 if (!ptr) |
69 return NULL; | 69 return NULL; |
70 | 70 |
71 if (location) | 71 if (location) |