MCPcopy Create free account
hub / github.com/F-Stack/f-stack / xo_syslog_handle_write

Function xo_syslog_handle_write

tools/libxo/libxo/xo_syslog.c:454–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452}
453
454static xo_ssize_t
455xo_syslog_handle_write (void *opaque, const char *data)
456{
457 xo_buffer_t *xbp = opaque;
458 int len = strlen(data);
459 int left = xo_buf_left(xbp);
460
461 if (len > left - 1)
462 len = left - 1;
463
464 memcpy(xbp->xb_curp, data, len);
465 xbp->xb_curp += len;
466 *xbp->xb_curp = '\0';
467
468 return len;
469}
470
471static void
472xo_syslog_handle_close (void *opaque UNUSED)

Callers

nothing calls this directly

Calls 2

xo_buf_leftFunction · 0.85
memcpyFunction · 0.50

Tested by

no test coverage detected