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:
committed by
Benoît Dejean
parent
933683da39
commit
f41ab3beed
@@ -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;
|
||||||
|
|
||||||
|
@@ -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);
|
||||||
|
Reference in New Issue
Block a user