Changeset 1931 for trunk/src/kmk/read.c
- Timestamp:
- Oct 24, 2008, 9:02:48 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/read.c
r1930 r1931 905 905 cp = ap = allocated_variable_expand (p2); 906 906 #else 907 cp = ap = allocated_variable_expand_2 (p2, eol - p2, NULL); 907 unsigned int buf_len; 908 cp = ap = allocated_variable_expand_3 (p2, eol - p2, NULL, &buf_len); 908 909 #endif 909 910 … … 917 918 } 918 919 920 #ifndef CONFIG_WITH_VALUE_LENGTH 919 921 free (ap); 922 #else 923 recycle_variable_buffer (ap, buf_len); 924 #endif 920 925 } 921 926 } … … 939 944 cp = ap = allocated_variable_expand (p2); 940 945 #else 941 cp = ap = allocated_variable_expand_2 (p2, eol - p2, NULL); 946 unsigned int buf_len; 947 cp = ap = allocated_variable_expand_3 (p2, eol - p2, NULL, &buf_len); 942 948 #endif 943 949 … … 952 958 } 953 959 960 #ifndef CONFIG_WITH_VALUE_LENGTH 954 961 free (ap); 962 #else 963 recycle_variable_buffer (ap, buf_len); 964 #endif 955 965 } 956 966 goto rule_complete; … … 995 1005 ? incdep_queue : incdep_flush; 996 1006 char *free_me = NULL; 1007 unsigned int buf_len; 997 1008 char *name = p2; 998 1009 … … 1000 1011 { 1001 1012 unsigned int name_len; 1002 free_me = name = allocated_variable_expand_ 2 (name, eol - name, &name_len);1013 free_me = name = allocated_variable_expand_3 (name, eol - name, &name_len, &buf_len); 1003 1014 eol = name + name_len; 1004 1015 while (isspace ((unsigned char)*name)) … … 1013 1024 1014 1025 if (free_me) 1015 free (free_me);1026 recycle_variable_buffer (free_me, buf_len); 1016 1027 goto rule_complete; 1017 1028 } … … 1032 1043 p = allocated_variable_expand (p2); 1033 1044 #else 1034 p = allocated_variable_expand_2 (p2, eol - p2, NULL); 1045 unsigned int buf_len; 1046 p = allocated_variable_expand_3 (p2, eol - p2, NULL, &buf_len); 1035 1047 #endif 1036 1048 … … 1038 1050 if (*p == '\0') 1039 1051 { 1052 #ifndef CONFIG_WITH_VALUE_LENGTH 1040 1053 free (p); 1054 #else 1055 recycle_variable_buffer (p, buf_len); 1056 #endif 1041 1057 continue; 1042 1058 } … … 1053 1069 &nameseq_cache); 1054 1070 #endif 1071 #ifndef CONFIG_WITH_VALUE_LENGTH 1055 1072 free (p); 1073 #else 1074 recycle_variable_buffer (p, buf_len); 1075 #endif 1056 1076 1057 1077 /* Save the state of conditionals and start
Note:
See TracChangeset
for help on using the changeset viewer.