Allocate an integer in the shortPool & return a pointer to it. Return a NULL pointer if the pool is exhausted
| 261 | // Allocate an integer in the shortPool & return a pointer to it. Return a NULL |
| 262 | // pointer if the pool is exhausted |
| 263 | static ISC_USHORT* AllocShortPool() |
| 264 | { |
| 265 | for (int i = 0; i < MAX_PARAMS; i++) |
| 266 | { |
| 267 | if (! shortPool[i]) |
| 268 | { |
| 269 | shortPool[i] = (ISC_USHORT *)malloc(sizeof(ISC_USHORT)); |
| 270 | return (shortPool[i]); |
| 271 | } |
| 272 | } |
| 273 | return (NULL); |
| 274 | } |
| 275 | |
| 276 | // Allocate an ISC_STATUS array to hold the status vector of isc_* functions. |
| 277 | // For convenience this is allocated from the string pool since there is only |