mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-capture: Use C11 types instead of GLib types
This is an almost entirely mechanical* conversion from (for example) `gint` → `int`, `guint8` → `uint8_t`, etc. It is not entirely complete, as many GLib functions are still used in libsysprof-capture, which necessitate some use of GLib types. It also avoids renaming `gboolean` → `bool` as that’s a slightly more controversial change which will happen in the following commit. *Code was manually realigned afterwards. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #40
This commit is contained in:
@ -60,12 +60,12 @@
|
||||
|
||||
#include "sysprof-clock.h"
|
||||
|
||||
gint sysprof_clock = -1;
|
||||
int sysprof_clock = -1;
|
||||
|
||||
void
|
||||
sysprof_clock_init (void)
|
||||
{
|
||||
static const gint clock_ids[] = {
|
||||
static const int clock_ids[] = {
|
||||
CLOCK_MONOTONIC,
|
||||
CLOCK_MONOTONIC_RAW,
|
||||
#ifdef __linux__
|
||||
@ -78,7 +78,7 @@ sysprof_clock_init (void)
|
||||
if (sysprof_clock != -1)
|
||||
return;
|
||||
|
||||
for (guint i = 0; i < G_N_ELEMENTS (clock_ids); i++)
|
||||
for (unsigned int i = 0; i < G_N_ELEMENTS (clock_ids); i++)
|
||||
{
|
||||
struct timespec ts;
|
||||
int clock_id = clock_ids [i];
|
||||
|
||||
Reference in New Issue
Block a user