[Spice-devel] [PATCH spice-gtk] Replace getenv/setenv with g_getenv/g_setenv for Win32 portability
Hans de Goede
hdegoede at redhat.com
Thu Apr 26 03:29:02 PDT 2012
ACK.
On 04/26/2012 11:08 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange"<berrange at redhat.com>
>
> ---
> gtk/spice-util.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gtk/spice-util.c b/gtk/spice-util.c
> index fdea362..62c6549 100644
> --- a/gtk/spice-util.c
> +++ b/gtk/spice-util.c
> @@ -49,12 +49,12 @@ void spice_util_set_debug(gboolean enabled)
> {
> #if GLIB_CHECK_VERSION(2, 31, 0)
> if (enabled) {
> - gchar *doms = getenv("G_MESSAGES_DEBUG");
> + gchar *doms = g_getenv("G_MESSAGES_DEBUG");
> if (!doms) {
> - setenv("G_MESSAGES_DEBUG", G_LOG_DOMAIN, 1);
> + g_setenv("G_MESSAGES_DEBUG", G_LOG_DOMAIN, 1);
> } else if (!strstr(doms, G_LOG_DOMAIN)) {
> gchar *newdoms = g_strdup_printf("%s %s", doms, G_LOG_DOMAIN);
> - setenv("G_MESSAGES_DEBUG", newdoms, 1);
> + g_setenv("G_MESSAGES_DEBUG", newdoms, 1);
> g_free(newdoms);
> }
> }
More information about the Spice-devel
mailing list