diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-07-20 20:39:31 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-07-20 20:39:31 -0700 |
commit | b08fb866378693d2e75f17fdfe5e60401a29136a (patch) | |
tree | ad1eb00129b96d284ab9ed4ca2de1cc176219777 /kill.cpp | |
parent | b290fd33b973e573ffc7fc0c87be3ab431678b5f (diff) |
Renamed env_vars to env_vars_snapshot_t
Cleanup of non-wcstring version of path_get_path
Diffstat (limited to 'kill.cpp')
-rw-r--r-- | kill.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -57,14 +57,9 @@ static wchar_t *cut_buffer=0; */ static int has_xsel() { - static int called=0; - static int res = 0; - - if (!called) { - wchar_t *path = path_get_path( L"xsel" ); - res = !!path; - free(path); - called = 1; + static int res=-1; + if (res < 0) { + res = !! path_get_path(L"xsel", NULL); } return res; |