aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2017-07-06 15:35:09 +0200
committerAlexey Kardashevskiy <aik@ozlabs.ru>2017-07-07 16:40:58 +1000
commit64215f41aafd182e51947dc5d544e5ebaab744ca (patch)
tree1b8fc321454148f5c4daa69e0c5af895c5401fe2 /lib
parent14df554937c80997c610c6aef9fb89f3449f5ff4 (diff)
downloadSLOF-64215f41aafd182e51947dc5d544e5ebaab744ca.zip
SLOF-64215f41aafd182e51947dc5d544e5ebaab744ca.tar.gz
SLOF-64215f41aafd182e51947dc5d544e5ebaab744ca.tar.bz2
libnet: Make the code compilable with -Wformat-security
When compiling the libnet code with the -Wformat-security compiler flag, there is a warning in tftp.c that printf is used without format argument. It's not a real problem here, but let's make the code ready for this compiler flag anyway and add a proper format string here, too. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'lib')
-rw-r--r--lib/libnet/tftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libnet/tftp.c b/lib/libnet/tftp.c
index ab63578..108092b 100644
--- a/lib/libnet/tftp.c
+++ b/lib/libnet/tftp.c
@@ -266,7 +266,7 @@ static void print_progress(int urgent, int received_bytes)
sprintf(buffer, "%d KBytes", (progress_last_bytes >> 10));
for(ptr = buffer; *ptr != 0; ++ptr)
*ptr = '\b';
- printf(buffer);
+ printf("%s", buffer);
}
printf("%d KBytes", (received_bytes >> 10));
i = 1;