diff --git a/sysdeps/linux/ChangeLog b/sysdeps/linux/ChangeLog index 2b91dd43..8696c2a6 100644 --- a/sysdeps/linux/ChangeLog +++ b/sysdeps/linux/ChangeLog @@ -1,3 +1,9 @@ +2007-05-17 Benoît Dejean + + * procopenfiles.c: (glibtop_get_proc_open_files_s): + + Added missing sizeof. + 2007-05-07 Benoît Dejean * procwd.c: diff --git a/sysdeps/linux/procopenfiles.c b/sysdeps/linux/procopenfiles.c index e1acad55..58295ca2 100644 --- a/sysdeps/linux/procopenfiles.c +++ b/sysdeps/linux/procopenfiles.c @@ -195,7 +195,6 @@ glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pi while((direntry = readdir(dir))) { char tgt [BUFSIZ]; - int rv; glibtop_open_files_entry entry = {0}; if(direntry->d_name[0] == '.') @@ -204,7 +203,7 @@ glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pi g_snprintf(fn, sizeof fn, "/proc/%d/fd/%s", pid, direntry->d_name); - if (!safe_readlink(fn, tgt, tgt)) + if (!safe_readlink(fn, tgt, sizeof tgt)) continue; entry.fd = atoi(direntry->d_name);