[metacity] main: check g_setenv return value
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] main: check g_setenv return value
- Date: Sun, 14 Mar 2021 20:45:16 +0000 (UTC)
commit 6066b452731ff22a7ac7b75b91cbc233be00a498
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Mar 14 22:44:12 2021 +0200
main: check g_setenv return value
Coverity CID: #1502679
src/core/main.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/core/main.c b/src/core/main.c
index 038398eda..522022078 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -383,7 +383,10 @@ meta_select_display (gchar *display_name)
env_var = g_getenv ("METACITY_DISPLAY");
if (env_var)
- g_setenv ("DISPLAY", env_var, TRUE);
+ {
+ if (!g_setenv ("DISPLAY", env_var, TRUE))
+ g_warning ("Couldn't set DISPLAY");
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]