Changeset 783 in MondoRescue for trunk/mondo/mondo/common/libmondo-raid.c
- Timestamp:
- Aug 31, 2006, 5:09:20 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/common/libmondo-raid.c
r689 r783 9 9 10 10 #include "my-stuff.h" 11 #include "mr_string.h" 11 12 #include "mondostructures.h" 12 13 #include "newt-specific-EXT.h" … … 177 178 { 178 179 /*@ buffers ***************************************************** */ 179 char *sz_value; 180 char *sz_value = NULL; 181 char *sz_label = NULL; 180 182 181 183 assert(raidrec != NULL); … … 183 185 184 186 asprintf(&sz_value, "%d", value); 185 strcpy(raidrec->additional_vars.el[lino].label,label);186 strcpy(raidrec->additional_vars.el[lino].value, sz_value);187 paranoid_free(sz_value);187 asprintf(&sz_label,label); 188 raidrec->additional_vars.el[lino].value = sz_value; 189 raidrec->additional_vars.el[lino].label = sz_label; 188 190 } 189 191 #endif … … 956 958 // trim leading spaces 957 959 pos = string; 958 while (*pos == ' ') pos += 1;960 while (*pos == ' ') pos++; 959 961 asprintf(&strtmp, pos); 960 strcpy(string,strtmp);962 paranoid_alloc(string,strtmp); 961 963 paranoid_free(strtmp); 962 964 // if we have newline after only spaces, this is a blank line, update … … 979 981 // get RAID device name 980 982 asprintf(&strtmp,"%s%s", device_prefix, token); 981 strcpy(raidlist->el[raidlist->entries].raid_device, strtmp); 982 paranoid_free(strtmp); 983 raidlist->el[raidlist->entries].raid_device = strtmp; 983 984 paranoid_free(token); 984 985 // skip ':' and status
Note:
See TracChangeset
for help on using the changeset viewer.