From 20cb9c923efa4edc348eba30f956a66413a8208f Mon Sep 17 00:00:00 2001 From: Pauli Nieminen Date: Thu, 22 Jul 2010 11:13:10 +0300 Subject: 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 Reviewed-by: Peter Hutterer --- xkb/xkmread.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xkb') diff --git a/xkb/xkmread.c b/xkb/xkmread.c index 814bb1d41..9eb86018e 100644 --- a/xkb/xkmread.c +++ b/xkb/xkmread.c @@ -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: -- cgit v1.2.3