diff options
author | Pauli Nieminen <ext-pauli.nieminen@nokia.com> | 2010-07-22 11:13:10 +0300 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-09-01 14:42:53 +1000 |
commit | 20cb9c923efa4edc348eba30f956a66413a8208f (patch) | |
tree | 693851bec6eaed8f4e2f8e4d35239e0b1d3d33a2 /xkb/xkmread.c | |
parent | de8be07cc0a8163b6ef04455706fd5ca2cebe587 (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>
Diffstat (limited to 'xkb/xkmread.c')
-rw-r--r-- | xkb/xkmread.c | 3 |
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: |