From 977a4477f646e344e66a7b0bc22e2e89b72d20db Mon Sep 17 00:00:00 2001 From: ridiculousfish <corydoras@ridiculousfish.com> Date: Mon, 16 Jul 2012 12:19:41 -0700 Subject: [PATCH] Fix for process completion on Linux --- expand.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/expand.cpp b/expand.cpp index f0777362e..1b22a20d9 100644 --- a/expand.cpp +++ b/expand.cpp @@ -493,7 +493,7 @@ bool process_iterator_t::next_process(wcstring *out_str, pid_t *out_pid) /* the 'cmdline' file exists, it should contain the commandline */ FILE *cmdfile; - if ((cmdfile=wfopen(path + L"/cmdline", "r"))==0) + if ((cmdfile=wfopen(path + L"/cmdline", "r"))) { wcstring full_command_line; signal_block(); @@ -509,7 +509,7 @@ bool process_iterator_t::next_process(wcstring *out_str, pid_t *out_pid) } } #ifdef SunOS - else if ((cmdfile=wfopen(path + L"/psinfo", "r"))==0) + else if ((cmdfile=wfopen(path + L"/psinfo", "r"))) { psinfo_t info; if (fread(&info, sizeof(info), 1, cmdfile))