Modify data type in CommonUtil.cpp (#1996)

Signed-off-by: JUN <gujun720@foxmail.com>
This commit is contained in:
JUN 2020-04-20 20:42:16 +08:00 committed by GitHub
parent 315dac3338
commit a2e7a91964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -182,7 +182,7 @@ std::string
CommonUtil::GetExePath() {
const size_t buf_len = 1024;
char buf[buf_len];
size_t cnt = readlink("/proc/self/exe", buf, buf_len);
ssize_t cnt = readlink("/proc/self/exe", buf, buf_len);
fiu_do_on("CommonUtil.GetExePath.readlink_fail", cnt = -1);
if (cnt < 0 || cnt >= buf_len) {
return "";