From f8b9e6f7cc418380db8495dd4c5b15ad4b5e0f43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Dejean?= Date: Thu, 17 May 2007 12:10:11 +0000 Subject: [PATCH] Added missing sizeof. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2007-05-17 Benoît Dejean * procopenfiles.c: (glibtop_get_proc_open_files_s): Added missing sizeof. svn path=/trunk/; revision=2591 --- sysdeps/linux/ChangeLog | 6 ++++++ sysdeps/linux/procopenfiles.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) 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);