aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-02-23 22:01:36 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-02-23 22:01:36 +0000
commitd354899c8279146f3e154b9ba1f7461abb7f5279 (patch)
treeafe574ef5461c92898032bf80588f22a77832623 /target-i386
parent161717d2cb714f8a73d4167d280a5fad7d3f5bc7 (diff)
downloadqemu-d354899c8279146f3e154b9ba1f7461abb7f5279.zip
qemu-d354899c8279146f3e154b9ba1f7461abb7f5279.tar.gz
qemu-d354899c8279146f3e154b9ba1f7461abb7f5279.tar.bz2
Fix OpenBSD linker warning
helper.o(.text+0x11e0): In function `listflags': /src/qemu/target-i386/helper.c:661: warning: sprintf() is often misused, please use snprintf() Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/helper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 57e6f7c..080d2b8 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -657,8 +657,9 @@ static void listflags(char *buf, int bufsize, uint32_t fbits,
else
nc = snprintf(q, bufsize, "%s[%d]", q == buf ? "" : " ", bit);
if (bufsize <= nc) {
- if (b)
- sprintf(b, "...");
+ if (b) {
+ memcpy(b, "...", sizeof("..."));
+ }
return;
}
q += nc;