| 326 | } |
| 327 | |
| 328 | static SBUF2 *sbuf2openread(const char *filename) |
| 329 | { |
| 330 | int fd; |
| 331 | SBUF2 *s; |
| 332 | |
| 333 | if ((fd = open(filename, O_RDONLY, 0)) < 0 || |
| 334 | (s = sbuf2open(fd, 0)) == NULL) { |
| 335 | if (fd >= 0) |
| 336 | close(fd); |
| 337 | return NULL; |
| 338 | } |
| 339 | return s; |
| 340 | } |
| 341 | |
| 342 | #if defined(__APPLE__) |
| 343 | #include <libproc.h> |
no outgoing calls
no test coverage detected