|
a/src/utils/circache.cpp |
|
b/src/utils/circache.cpp |
|
... |
|
... |
1102 |
ConfSimple conf(dic, 1);
|
1102 |
ConfSimple conf(dic, 1);
|
1103 |
conf.get("udi", udi, "");
|
1103 |
conf.get("udi", udi, "");
|
1104 |
return true;
|
1104 |
return true;
|
1105 |
}
|
1105 |
}
|
1106 |
|
1106 |
|
1107 |
void *
|
1107 |
static void *allocmem(
|
1108 |
allocmem(void *cp, /* The array to grow. may be NULL */
|
1108 |
void *cp, /* The array to grow. may be NULL */
|
1109 |
int sz, /* Unit size in bytes */
|
1109 |
int sz, /* Unit size in bytes */
|
1110 |
int *np, /* Pointer to current allocation number */
|
1110 |
int *np, /* Pointer to current allocation number */
|
1111 |
int min, /* Number to allocate the first time */
|
1111 |
int min, /* Number to allocate the first time */
|
1112 |
int maxinc) /* Maximum increment */
|
1112 |
int maxinc) /* Maximum increment */
|
1113 |
{
|
1113 |
{
|
1114 |
if (cp == 0) {
|
1114 |
if (cp == 0) {
|
1115 |
cp = malloc(min * sz);
|
1115 |
cp = malloc(min * sz);
|
1116 |
*np = cp ? min : 0;
|
1116 |
*np = cp ? min : 0;
|
1117 |
return cp;
|
1117 |
return cp;
|