xkb: Use memcpy for copy that has known length

Fixes warning that strncpy is not able to append NULL to the end
of destination.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Pauli Nieminen 2010-07-22 11:13:10 +03:00 committed by Peter Hutterer
parent de8be07cc0
commit 20cb9c923e

View File

@ -534,8 +534,7 @@ XkbAction *act;
case XkbSA_XFree86Private:
/* copy the kind of action */
strncpy((char*)act->any.data, (char*)wire.actionData,
XkbAnyActionDataSize);
memcpy(act->any.data, wire.actionData, XkbAnyActionDataSize);
break ;
case XkbSA_Terminate: