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:
Blue Swirl 2010-03-18 20:48:19 +00:00
parent 43dc2a645e
commit d35215f808

View File

@ -810,7 +810,8 @@ static void qemu_opts_from_qdict_1(const char *key, QObject *obj, void *opaque)
value = buf; value = buf;
break; break;
case QTYPE_QBOOL: 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; value = buf;
break; break;
default: default: