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:
Benoît Dejean
2007-05-17 12:10:11 +00:00
committed by Benoît Dejean
parent 8fc7451000
commit f8b9e6f7cc
2 changed files with 7 additions and 2 deletions

View File

@@ -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:

View File

@@ -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);