Allocate an integer in the intPool & return a pointer to it. Return a NULL pointer if the pool is exhausted
| 246 | // Allocate an integer in the intPool & return a pointer to it. Return a NULL |
| 247 | // pointer if the pool is exhausted |
| 248 | static ISC_ULONG* AllocIntPool() |
| 249 | { |
| 250 | for (int i = 0; i < MAX_PARAMS; i++) |
| 251 | { |
| 252 | if (! intPool[i]) |
| 253 | { |
| 254 | intPool[i] = (ISC_ULONG *)malloc(sizeof(ISC_ULONG)); |
| 255 | return (intPool[i]); |
| 256 | } |
| 257 | } |
| 258 | return (NULL); |
| 259 | } |
| 260 | |
| 261 | // Allocate an integer in the shortPool & return a pointer to it. Return a NULL |
| 262 | // pointer if the pool is exhausted |