mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-capture: short-circuit empty write
This commit is contained in:
@ -203,6 +203,9 @@ sysprof_capture_writer_flush_data (SysprofCaptureWriter *self)
|
||||
g_assert (self->pos <= self->len);
|
||||
g_assert ((self->pos % SYSPROF_CAPTURE_ALIGN) == 0);
|
||||
|
||||
if (self->pos == 0)
|
||||
return TRUE;
|
||||
|
||||
buf = self->buf;
|
||||
to_write = self->pos;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user