[libgtop] Don't printf a string directly but use %s instead
- From: Benoît Dejean <bdejean src gnome org>
- To: svn-commits-list gnome org
- Subject: [libgtop] Don't printf a string directly but use %s instead
- Date: Mon, 25 May 2009 16:29:33 -0400 (EDT)
commit f41ab3beed3a2b90475c6057689575413b7b348b
Author: Christian Persch <chpe gnome org>
Date: Thu May 7 12:57:54 2009 +0200
Don't printf a string directly but use %s instead
Bug #581725.
Signed-off-by: Benoît Dejean <benoit placenet org>
---
sysdeps/linux/fsusage.c | 2 +-
sysdeps/linux/glibtop_private.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/linux/fsusage.c b/sysdeps/linux/fsusage.c
index 559ba1f..1356494 100644
--- a/sysdeps/linux/fsusage.c
+++ b/sysdeps/linux/fsusage.c
@@ -140,7 +140,7 @@ static void linux_2_6_0(glibtop *server, glibtop_fsusage *buf, const char *path)
get_sys_path(server, device, &filename, &format);
- ret = try_file_to_buffer(buffer, sizeof buffer, filename);
+ ret = try_file_to_buffer(buffer, sizeof buffer, "%s", filename);
if (ret < 0) goto out;
diff --git a/sysdeps/linux/glibtop_private.c b/sysdeps/linux/glibtop_private.c
index 041624c..52c3782 100644
--- a/sysdeps/linux/glibtop_private.c
+++ b/sysdeps/linux/glibtop_private.c
@@ -124,7 +124,7 @@ int try_file_to_buffer(char *buffer, size_t bufsiz, const char *format, ...)
void
file_to_buffer(glibtop *server, char *buffer, size_t bufsiz, const char *filename)
{
- switch(try_file_to_buffer(buffer, bufsiz, filename))
+ switch(try_file_to_buffer(buffer, bufsiz, "%s", filename))
{
case TRY_FILE_TO_BUFFER_OPEN:
glibtop_error_io_r (server, "open (%s)", filename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]