diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-02-23 22:01:36 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-02-23 22:01:36 +0000 |
commit | d354899c8279146f3e154b9ba1f7461abb7f5279 (patch) | |
tree | afe574ef5461c92898032bf80588f22a77832623 /target-i386 | |
parent | 161717d2cb714f8a73d4167d280a5fad7d3f5bc7 (diff) |
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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c index 57e6f7c806..080d2b8c7d 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; |