diff options
author | Ingo Bürk | 2018-06-22 13:55:09 +0200 |
---|---|---|
committer | GitHub | 2018-06-22 13:55:09 +0200 |
commit | 4d3344ab9cd68bad5faf4ed3dad185dfcacb1e3d (patch) | |
tree | 66846b5f6023291fda2d72fe523d4ee0614d2a1f /src/process_runs.c | |
parent | Merge pull request #289 from bebehei/testsuite (diff) | |
parent | Prevent potential crash if glob() fails (diff) |
Merge pull request #290 from duskCoder/changes
Fix potential issues & avoid unnecessary instructions
Diffstat (limited to 'src/process_runs.c')
-rw-r--r-- | src/process_runs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/process_runs.c b/src/process_runs.c index b5e8f11..da2dba1 100644 --- a/src/process_runs.c +++ b/src/process_runs.c @@ -24,7 +24,7 @@ bool process_runs(const char *path) { static glob_t globbuf; memset(pidbuf, 0, sizeof(pidbuf)); - if (glob(path, GLOB_NOCHECK | GLOB_TILDE, NULL, &globbuf) < 0) + if (glob(path, GLOB_NOCHECK | GLOB_TILDE, NULL, &globbuf) != 0) die("glob() failed\n"); if (globbuf.gl_pathc == 0) { /* No glob matches, the specified path does not contain a wildcard. */ |