Changeset 1107 for trunk/src/kmk/variable.c
- Timestamp:
- Sep 23, 2007, 7:29:00 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/variable.c
r1101 r1107 1394 1394 1395 1395 /* The juicy bits, append the specified value to the variable 1396 This is a heavily exerci ed code path in kBuild. */1396 This is a heavily exercised code path in kBuild. */ 1397 1397 if (v->recursive) 1398 1398 { … … 1406 1406 if ((unsigned)v->value_alloc_len <= new_value_len) 1407 1407 { 1408 /* XXX: anticipating further appends/prepends. */ 1409 if (value_len > v->value_alloc_len) 1410 v->value_alloc_len = (new_value_len + 0x80) + 0x7f; 1411 else 1412 v->value_alloc_len = (new_value_len + value_len + 0x80) + 0x7f; 1408 v->value_alloc_len *= 2; 1409 if (v->value_alloc_len < new_value_len) 1410 v->value_alloc_len = (new_value_len + value_len + 0x7f) + ~0x7fU; 1413 1411 if (append || !v->value_length) 1414 1412 v->value = xrealloc (v->value, v->value_alloc_len);
Note:
See TracChangeset
for help on using the changeset viewer.