aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/utils.vala
diff options
context:
space:
mode:
authorWolfgang Müller2021-06-19 15:44:32 +0200
committerWolfgang Müller2021-06-19 15:53:12 +0200
commitddba80e644d1d47ce9aa6654879f035964ac19ac (patch)
tree722c2fddb7e7266c897cfa7c3d2fee12c3e83107 /utils.vala
parent89f8571cbcf48b7810c7027faf26ee5cf4b968b1 (diff)
downloadweltschmerz-ddba80e644d1d47ce9aa6654879f035964ac19ac.tar.gz
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.
Diffstat (limited to 'utils.vala')
-rw-r--r--utils.vala4
1 files 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;
}