| 2199 | /* Safe version of calloc(). This function is taken from gdal/cpl. */ |
| 2200 | |
| 2201 | void *msSmallCalloc( size_t nCount, size_t nSize ) |
| 2202 | { |
| 2203 | void *pReturn; |
| 2204 | |
| 2205 | if( nSize * nCount == 0 ) |
| 2206 | return NULL; |
| 2207 | |
| 2208 | pReturn = calloc( nCount, nSize ); |
| 2209 | if( pReturn == NULL ) |
| 2210 | { |
| 2211 | fprintf(stderr, "msSmallCalloc(): Out of memory allocating %ld bytes.\n", |
| 2212 | (long)(nCount*nSize)); |
| 2213 | exit(1); |
| 2214 | } |
| 2215 | |
| 2216 | return pReturn; |
| 2217 | } |
| 2218 | |
| 2219 | /* |
| 2220 | ** msBuildOnlineResource() |
no outgoing calls
no test coverage detected