MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / sbuf2openread

Function sbuf2openread

cdb2api/cdb2api.c:328–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326}
327
328static 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>

Callers 2

proc_cmdline_getargv0Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected