From 4c8addcfb5515787d95a2a0547b3eaaf4032d3ae Mon Sep 17 00:00:00 2001 From: Nikolai Lifanov Date: Fri, 2 Dec 2016 19:43:51 -0500 Subject: [PATCH] FreeBSD: fix refactoring some more - sysctl produces a string --- src/folder.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/folder.c b/src/folder.c index 05fc22a63..f28c52c67 100644 --- a/src/folder.c +++ b/src/folder.c @@ -65,9 +65,7 @@ static int get_exec_path (char *exec_path, const size_t exec_path_sz) sysctl (mib, 4, exec_path, &size, NULL, 0); - const ssize_t len = readlink (tmp, exec_path, exec_path_sz - 1); - - if (len == -1) return -1; + const size_t len = strlen (exec_path); #else #error Your Operating System is not supported or detected