summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPauli Nieminen <ext-pauli.nieminen@nokia.com>2010-07-22 11:13:10 +0300
committerPeter Hutterer <peter.hutterer@who-t.net>2010-09-01 14:42:53 +1000
commit20cb9c923efa4edc348eba30f956a66413a8208f (patch)
tree693851bec6eaed8f4e2f8e4d35239e0b1d3d33a2
parentde8be07cc0a8163b6ef04455706fd5ca2cebe587 (diff)
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>
-rw-r--r--xkb/xkmread.c3
1 files changed, 1 insertions, 2 deletions
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: