From ddba80e644d1d47ce9aa6654879f035964ac19ac Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Sat, 19 Jun 2021 15:44:32 +0200 Subject: Mark env_shell as unowned The Environment.get_variable() method returns an unowned value. Make sure to mark it as such in our code. Whilst we're here, add a missing space to the subsequent if branch. --- utils.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils.vala b/utils.vala index 0c5bd35..715e0b8 100644 --- a/utils.vala +++ b/utils.vala @@ -1,7 +1,7 @@ class Utils { public static string get_shell() { - var env_shell = Environment.get_variable("SHELL"); - if (env_shell != null && env_shell.length > 0){ + unowned var env_shell = Environment.get_variable("SHELL"); + if (env_shell != null && env_shell.length > 0) { return env_shell; } -- cgit v1.2.3-2-gb3c3