- if (oldp != 0) {
- if ((newp = realloc(oldp, amount)) == 0) {
- free(oldp);
- errno = ENOMEM; /* just in case 'free' reset */
- }
- } else {
- newp = typeMalloc(char, amount);
+ if (oldp != 0) {
+ if ((newp = realloc(oldp, amount)) == 0) {
+ free(oldp);
+ errno = ENOMEM; /* just in case 'free' reset */