Fix OpenBSD linker warning
qemu-option.o(.text+0x20f8): In function `qemu_opts_from_qdict_1': /src/qemu/qemu-option.c:813: warning: strcpy() is almost always misused, please use strlcpy() Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
43dc2a645e
commit
d35215f808
@ -810,7 +810,8 @@ static void qemu_opts_from_qdict_1(const char *key, QObject *obj, void *opaque)
|
||||
value = buf;
|
||||
break;
|
||||
case QTYPE_QBOOL:
|
||||
strcpy(buf, qbool_get_int(qobject_to_qbool(obj)) ? "on" : "off");
|
||||
pstrcpy(buf, sizeof(buf),
|
||||
qbool_get_int(qobject_to_qbool(obj)) ? "on" : "off");
|
||||
value = buf;
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user