Don't printf a string directly but use %s instead

Bug #581725.

Signed-off-by: Benoît Dejean <benoit@placenet.org>
This commit is contained in:
Christian Persch
2009-05-07 12:57:54 +02:00
committed by Benoît Dejean
parent 933683da39
commit f41ab3beed
2 changed files with 2 additions and 2 deletions

View File

@@ -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); 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; if (ret < 0) goto out;

View File

@@ -124,7 +124,7 @@ int try_file_to_buffer(char *buffer, size_t bufsiz, const char *format, ...)
void void
file_to_buffer(glibtop *server, char *buffer, size_t bufsiz, const char *filename) 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: case TRY_FILE_TO_BUFFER_OPEN:
glibtop_error_io_r (server, "open (%s)", filename); glibtop_error_io_r (server, "open (%s)", filename);