Changes in uspace/lib/posix/unistd.c [94f8b81c:221afc9e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/unistd.c
r94f8b81c r221afc9e 31 31 * @{ 32 32 */ 33 /** @file Miscellaneous standard definitions.33 /** @file 34 34 */ 35 35 … … 90 90 /* Always returns false, because there is no easy way to find 91 91 * out under HelenOS. */ 92 return 0;92 return false; 93 93 } 94 94 … … 207 207 /* Check file existence by attempt to open it. */ 208 208 int fd = open(path, O_RDONLY); 209 if (fd != -1) { 209 if (fd < 0) { 210 /* FIXME: open() returns error code as negative retval. */ 211 errno = -fd; 212 fd = -1; 213 } else { 210 214 close(fd); 211 215 } … … 235 239 clk_tck = ((long) cpu_stats[0].frequency_mhz) * 1000000L; 236 240 } 237 if (cpu_stats) { 238 free(cpu_stats); 239 cpu_stats = 0; 240 } 241 free(cpu_stats); 242 cpu_stats = 0; 241 243 242 244 long phys_pages = 0; … … 246 248 phys_pages = (long) (mem_stats->total / getpagesize()); 247 249 avphys_pages = (long) (mem_stats->free / getpagesize()); 248 free(mem_stats);249 mem_stats = 0;250 }250 } 251 free(mem_stats); 252 mem_stats = 0; 251 253 252 254 switch (name) {
Note:
See TracChangeset
for help on using the changeset viewer.