From: Ricardo Mones Date: Wed, 9 Dec 2015 11:20:57 +0000 (+0100) Subject: Cosmetic: use always g_getenv instead of getenv X-Git-Tag: 3.13.1~15 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=b189d777f1bd0f791abfd328fd5cbcc34bbfa95e;ds=sidebyside Cosmetic: use always g_getenv instead of getenv --- diff --git a/src/crash.c b/src/crash.c index cb1f1fe30..386958127 100644 --- a/src/crash.c +++ b/src/crash.c @@ -14,7 +14,6 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * */ #ifdef HAVE_CONFIG_H @@ -486,7 +485,7 @@ static const gchar *get_operating_system(void) */ static gboolean is_crash_dialog_allowed(void) { - return !getenv("CLAWS_NO_CRASH"); + return !g_getenv("CLAWS_NO_CRASH"); } /*! diff --git a/src/jpilot.c b/src/jpilot.c index 3c54e4242..cedfca999 100644 --- a/src/jpilot.c +++ b/src/jpilot.c @@ -163,7 +163,7 @@ static const gchar *jpilot_get_charset(void) static const gchar *charset = NULL; if (charset == NULL) - charset = getenv("PILOT_CHARSET"); + charset = g_getenv("PILOT_CHARSET"); if (charset == NULL) charset = CS_CP1252; diff --git a/src/plugins/newmail/newmail.c b/src/plugins/newmail/newmail.c index 5bbdf73b7..588874870 100644 --- a/src/plugins/newmail/newmail.c +++ b/src/plugins/newmail/newmail.c @@ -1,10 +1,6 @@ /* - * newmail - A plugin for Claws Mail - * - * Copyright (C) 2005-2015 H.Merijn Brand and the Claws Mail Team - * * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2015 the Claws Mail Team + * Copyright (C) 2005-2015 H.Merijn Brand and the Claws Mail Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -119,7 +115,7 @@ gint plugin_init (gchar **error) if (!NewLog) { auto char *mode = truncLog ? "w" : "a"; if (!LogName) { - LogName = g_strconcat(getenv ("HOME"), G_DIR_SEPARATOR_S, DEFAULT_DIR, + LogName = g_strconcat(g_getenv ("HOME"), G_DIR_SEPARATOR_S, DEFAULT_DIR, G_DIR_SEPARATOR_S, LOG_NAME, NULL); } if (!(NewLog = fopen (LogName, mode))) { diff --git a/src/plugins/pgpcore/prefs_gpg.c b/src/plugins/pgpcore/prefs_gpg.c index 338206bc4..2aaebf28f 100644 --- a/src/plugins/pgpcore/prefs_gpg.c +++ b/src/plugins/pgpcore/prefs_gpg.c @@ -14,7 +14,6 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * */ #ifdef HAVE_CONFIG_H @@ -200,7 +199,7 @@ static void prefs_gpg_create_widget_func(PrefsPage *_page, gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_auto_check_signatures), config->auto_check_signatures); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_autocompletion), config->autocompletion); - if (!getenv("GPG_AGENT_INFO")) + if (!g_getenv("GPG_AGENT_INFO")) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_use_gpg_agent), FALSE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_use_gpg_agent), config->use_gpg_agent); diff --git a/src/plugins/pgpcore/sgpgme.c b/src/plugins/pgpcore/sgpgme.c index e799369c2..7afe4bfe8 100644 --- a/src/plugins/pgpcore/sgpgme.c +++ b/src/plugins/pgpcore/sgpgme.c @@ -14,7 +14,6 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * */ #ifdef HAVE_CONFIG_H @@ -458,7 +457,7 @@ gpgme_data_t sgpgme_decrypt_verify(gpgme_data_t cipher, gpgme_verify_result_t *s if (gpgme_get_protocol(ctx) == GPGME_PROTOCOL_OpenPGP) { prefs_gpg_enable_agent(prefs_gpg_get_config()->use_gpg_agent); - if (!getenv("GPG_AGENT_INFO") || !prefs_gpg_get_config()->use_gpg_agent) { + if (!g_getenv("GPG_AGENT_INFO") || !prefs_gpg_get_config()->use_gpg_agent) { info.c = ctx; gpgme_set_passphrase_cb (ctx, gpgmegtk_passphrase_cb, &info); } diff --git a/src/plugins/pgpinline/pgpinline.c b/src/plugins/pgpinline/pgpinline.c index a0bbd3ccd..7dc15027f 100644 --- a/src/plugins/pgpinline/pgpinline.c +++ b/src/plugins/pgpinline/pgpinline.c @@ -1,7 +1,6 @@ /* * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2015 Colin Leroy and - * the Claws Mail team + * Copyright (C) 1999-2015 Colin Leroy and the Claws Mail team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +14,6 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * */ #ifdef HAVE_CONFIG_H @@ -529,7 +527,7 @@ static gboolean pgpinline_sign(MimeInfo *mimeinfo, PrefsAccount *account, const } prefs_gpg_enable_agent(prefs_gpg_get_config()->use_gpg_agent); - if (!getenv("GPG_AGENT_INFO") || !prefs_gpg_get_config()->use_gpg_agent) { + if (!g_getenv("GPG_AGENT_INFO") || !prefs_gpg_get_config()->use_gpg_agent) { info.c = ctx; gpgme_set_passphrase_cb (ctx, gpgmegtk_passphrase_cb, &info); } diff --git a/src/plugins/pgpmime/pgpmime.c b/src/plugins/pgpmime/pgpmime.c index a8f38eced..670dfdc89 100644 --- a/src/plugins/pgpmime/pgpmime.c +++ b/src/plugins/pgpmime/pgpmime.c @@ -14,7 +14,6 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * */ #ifdef HAVE_CONFIG_H @@ -520,7 +519,7 @@ gboolean pgpmime_sign(MimeInfo *mimeinfo, PrefsAccount *account, const gchar *fr } prefs_gpg_enable_agent(prefs_gpg_get_config()->use_gpg_agent); - if (getenv("GPG_AGENT_INFO") && prefs_gpg_get_config()->use_gpg_agent) { + if (g_getenv("GPG_AGENT_INFO") && prefs_gpg_get_config()->use_gpg_agent) { debug_print("GPG_AGENT_INFO environment defined, running without passphrase callback\n"); } else { info.c = ctx; diff --git a/src/plugins/vcalendar/libical/libical/icaltime.c b/src/plugins/vcalendar/libical/libical/icaltime.c index 6532ff2e8..8e127cece 100644 --- a/src/plugins/vcalendar/libical/libical/icaltime.c +++ b/src/plugins/vcalendar/libical/libical/icaltime.c @@ -94,13 +94,13 @@ struct set_tz_save set_tz(const char* tzid) savetz.orig_tzid = 0; savetz.new_env_str = 0; - if(getenv("TZ") != 0){ - orig_tzid = (char*)icalmemory_strdup(getenv("TZ")); + if (g_getenv("TZ") != NULL) { + orig_tzid = (char*)icalmemory_strdup(g_getenv("TZ")); - if(orig_tzid == 0){ + if (orig_tzid == 0) { icalerror_set_errno(ICAL_NEWFAILED_ERROR); - return savetz; - } + return savetz; + } } tmp_sz =strlen(tzid)+4;