comparison util.c @ 744:fc68992cf18d

Merge windows branch with latest changes
author Michael Pavone <pavone@retrodev.com>
date Thu, 28 May 2015 21:19:55 -0700
parents 2e1b3b258523 6b248602ab84
children 206c449eaa81
comparison
equal deleted inserted replaced
743:cf78cb045fa4 744:fc68992cf18d
125 linktext = malloc(cursize); 125 linktext = malloc(cursize);
126 linksize = readlink(path, linktext, cursize-1); 126 linksize = readlink(path, linktext, cursize-1);
127 if (linksize == -1) { 127 if (linksize == -1) {
128 perror("readlink"); 128 perror("readlink");
129 free(linktext); 129 free(linktext);
130 linktext = NULL; 130 return NULL;
131 } 131 }
132 } while ((linksize+1) > cursize); 132 } while ((linksize+1) > cursize);
133 linktext[linksize] = 0; 133 linktext[linksize] = 0;
134 return linktext; 134 return linktext;
135 } 135 }