Added missing sizeof.
2007-05-17 Benoît Dejean <benoit@placenet.org> * procopenfiles.c: (glibtop_get_proc_open_files_s): Added missing sizeof. svn path=/trunk/; revision=2591
This commit is contained in:
committed by
Benoît Dejean
parent
8fc7451000
commit
f8b9e6f7cc
@@ -1,3 +1,9 @@
|
||||
2007-05-17 Benoît Dejean <benoit@placenet.org>
|
||||
|
||||
* procopenfiles.c: (glibtop_get_proc_open_files_s):
|
||||
|
||||
Added missing sizeof.
|
||||
|
||||
2007-05-07 Benoît Dejean <benoit@placenet.org>
|
||||
|
||||
* procwd.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);
|
||||
|
Reference in New Issue
Block a user