mirror of https://github.com/xzeldon/htop.git
Resolve conversion from ssize_t to int for readlink return value
This commit is contained in:
parent
8029e9af04
commit
f61e74a4af
10
Compat.c
10
Compat.c
|
@ -94,11 +94,11 @@ int Compat_openat(const char* dirpath,
|
||||||
|
|
||||||
#endif /* !HAVE_OPENAT */
|
#endif /* !HAVE_OPENAT */
|
||||||
|
|
||||||
int Compat_readlinkat(int dirfd,
|
ssize_t Compat_readlinkat(int dirfd,
|
||||||
const char* dirpath,
|
const char* dirpath,
|
||||||
const char* pathname,
|
const char* pathname,
|
||||||
char* buf,
|
char* buf,
|
||||||
size_t bufsize) {
|
size_t bufsize) {
|
||||||
|
|
||||||
#ifdef HAVE_READLINKAT
|
#ifdef HAVE_READLINKAT
|
||||||
|
|
||||||
|
|
10
Compat.h
10
Compat.h
|
@ -50,10 +50,10 @@ int Compat_openat(openat_arg_t dirpath, const char* pathname, int flags);
|
||||||
|
|
||||||
#endif /* HAVE_OPENAT */
|
#endif /* HAVE_OPENAT */
|
||||||
|
|
||||||
int Compat_readlinkat(int dirfd,
|
ssize_t Compat_readlinkat(int dirfd,
|
||||||
const char* dirpath,
|
const char* dirpath,
|
||||||
const char* pathname,
|
const char* pathname,
|
||||||
char* buf,
|
char* buf,
|
||||||
size_t bufsize);
|
size_t bufsize);
|
||||||
|
|
||||||
#endif /* HEADER_Compat */
|
#endif /* HEADER_Compat */
|
||||||
|
|
|
@ -371,7 +371,7 @@ char* Platform_getInodeFilename(pid_t pid, ino_t inode) {
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
struct dirent *de;
|
struct dirent *de;
|
||||||
DIR *dirp;
|
DIR *dirp;
|
||||||
size_t len;
|
ssize_t len;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
char path[PATH_MAX];
|
char path[PATH_MAX];
|
||||||
|
|
Loading…
Reference in New Issue