Changeset 1178 in MondoRescue for branches/stable/mondo/src/lib
- Timestamp:
- Feb 17, 2007, 2:27:26 AM (17 years ago)
- Location:
- branches/stable/mondo/src/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/lib/mr_mem.c
r1174 r1178 110 110 } 111 111 } 112 113 /* 114 * Equivalent function of strcat but safe 115 * from memory allocation point of view 116 */ 117 void mr_strcat_int(char **in, const char *add, int line, char *file) { 118 char *p =NULL; 119 120 if (add == NULL) { 121 return; 122 } 123 if (in == NULL) { 124 mr_msg_int(1,line,file,"Unable to add %s to NULL pointer\nExiting...", add); 125 mr_exit(-1, "Unable to add to a NULL pointer"); 126 } 127 if (*in == NULL) { 128 mr_asprintf_int(&p,line,file,add); 129 } else { 130 mr_asprintf_int(&p,line,file,"%s%s",*in,add); 131 mr_free_int((void **)in,line,file); 132 } 133 *in = p; 134 } -
branches/stable/mondo/src/lib/mr_str.c
r1168 r1178 122 122 * @param in_out The string to strip spaces/control characters from (modified). 123 123 */ 124 void mr_strip_spaces(char *in_out) 125 { 126 /*@ int ******************************************************** */ 124 void mr_strip_spaces(char *in_out) { 127 125 int i; 128 126 int j; 129 127 size_t length; 130 131 /*@ end vars *************************************************** */132 128 133 129 if (in_out == NULL) {
Note:
See TracChangeset
for help on using the changeset viewer.