[sysprof: 38/63] libsysprof-capture: Use POSIX environment functions instead of GLib ones
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof: 38/63] libsysprof-capture: Use POSIX environment functions instead of GLib ones
- Date: Sat, 4 Jul 2020 18:32:32 +0000 (UTC)
commit f5cf12ae401da69ecf28b2743179b9ccb72f76db
Author: Philip Withnall <withnall endlessm com>
Date: Thu Jul 2 12:18:24 2020 +0100
libsysprof-capture: Use POSIX environment functions instead of GLib ones
They are equivalent.
Signed-off-by: Philip Withnall <withnall endlessm com>
Helps: #40
src/libsysprof-capture/sysprof-capture-writer.c | 2 +-
src/libsysprof-capture/sysprof-collector.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libsysprof-capture/sysprof-capture-writer.c b/src/libsysprof-capture/sysprof-capture-writer.c
index ca3dd56..7926e6a 100644
--- a/src/libsysprof-capture/sysprof-capture-writer.c
+++ b/src/libsysprof-capture/sysprof-capture-writer.c
@@ -1361,7 +1361,7 @@ sysprof_capture_writer_new_from_env (size_t buffer_size)
const char *fdstr;
int fd;
- if (!(fdstr = g_getenv ("SYSPROF_TRACE_FD")))
+ if (!(fdstr = getenv ("SYSPROF_TRACE_FD")))
return NULL;
/* Make sure the clock is initialized */
diff --git a/src/libsysprof-capture/sysprof-collector.c b/src/libsysprof-capture/sysprof-collector.c
index 2b7ffec..c00765b 100644
--- a/src/libsysprof-capture/sysprof-collector.c
+++ b/src/libsysprof-capture/sysprof-collector.c
@@ -131,13 +131,13 @@ request_writer (void)
if (conn == NULL)
{
- const char *fdstr = g_getenv ("SYSPROF_CONTROL_FD");
+ const char *fdstr = getenv ("SYSPROF_CONTROL_FD");
int peer_fd = -1;
if (fdstr != NULL)
peer_fd = atoi (fdstr);
- g_unsetenv ("SYSPROF_CONTROL_FD");
+ unsetenv ("SYSPROF_CONTROL_FD");
if (peer_fd > 0)
{
@@ -251,7 +251,7 @@ sysprof_collector_get (void)
self->tid = self->pid;
#endif
- if (g_getenv ("SYSPROF_CONTROL_FD") != NULL)
+ if (getenv ("SYSPROF_CONTROL_FD") != NULL)
self->buffer = request_writer ();
if (self->is_shared)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]