Ticket #281: parse.C.diff
File parse.C.diff, 453 bytes (added by , 17 years ago) |
---|
-
parse.C
old new 137 137 // append to a malloc'd string 138 138 // 139 139 int strcatdup(char*& p, char* buf) { 140 p = (char*)realloc(p, strlen(p) + strlen(buf)+1); 141 if (!p) { 140 char* pt = (char*)realloc(p, strlen(p) + strlen(buf)+1); 141 if (pt) { 142 p = pt; 143 } else { 144 free(p); 142 145 return ERR_MALLOC; 143 146 } 144 147 strcat(p, buf);