Changeset 1932 for trunk/src/kmk/kbuild.c
- Timestamp:
- Oct 24, 2008, 10:22:22 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/kbuild.c
r1924 r1932 572 572 unsigned int value_len; 573 573 char *pszExpanded = allocated_variable_expand_2(pVar->value, pVar->value_length, &value_len); 574 free(pVar->value); 574 #ifdef CONFIG_WITH_RDONLY_VARIABLE_VALUE 575 if (pVar->rdonly_val) 576 pVar->rdonly_val = 0; 577 else 578 #endif 579 free(pVar->value); 580 assert (pVar->origin != o_automatic); 575 581 pVar->value = pszExpanded; 576 582 pVar->value_length = value_len; … … 643 649 struct variable *pVar = kbuild_lookup_variable_n(pszName, cchName); 644 650 if (pVar && pDefPath) 651 { 652 assert(pVar->origin != o_automatic); 653 #ifdef CONFIG_WITH_RDONLY_VARIABLE_VALUE 654 assert(!pVar->rdonly_val); 655 #endif 645 656 kbuild_apply_defpath(pDefPath, &pVar->value, (unsigned int *)&pVar->value_length, &pVar->value_alloc_len, 1); 657 } 646 658 return pVar; 647 659 } … … 661 673 struct variable *pVar = kbuild_lookup_variable(pszName); 662 674 if (pVar && pDefPath) 675 { 676 assert(pVar->origin != o_automatic); 677 #ifdef CONFIG_WITH_RDONLY_VARIABLE_VALUE 678 assert(!pVar->rdonly_val); 679 #endif 663 680 kbuild_apply_defpath(pDefPath, &pVar->value, (unsigned int *)&pVar->value_length, &pVar->value_alloc_len, 1); 681 } 664 682 return pVar; 665 683 } … … 2044 2062 */ 2045 2063 if (pDefPath) 2064 { 2065 /** @todo assert(pSource->origin != o_automatic); We're changing 'source' 2066 * from the foreach loop! */ 2067 #ifdef CONFIG_WITH_RDONLY_VARIABLE_VALUE 2068 assert(!pSource->rdonly_val); 2069 #endif 2046 2070 kbuild_apply_defpath(pDefPath, &pSource->value, (unsigned int *)&pSource->value_length, &pSource->value_alloc_len, 1 /* can free */); 2071 } 2047 2072 2048 2073 /*
Note:
See TracChangeset
for help on using the changeset viewer.