aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-11-16 12:58:27 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-11-16 12:58:27 +0000
commit0d7473cd5d676b9105d1d4c67f9e2a416859eec7 (patch)
tree18d802a69c4681e2589a12e6c6393ff64dbec917
parentwarning fix - compare unsigned vs unsigned (diff)
downloadterminology-0d7473cd5d676b9105d1d4c67f9e2a416859eec7.tar.gz
keyin - remove strncpy (so its strcpy) because its useless
wel alloc the buffer to be precisely the right size anyway so strncpy is just more complex code that leads to warnings.
-rw-r--r--src/bin/keyin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/keyin.c b/src/bin/keyin.c
index 76e613f..ca07818 100644
--- a/src/bin/keyin.c
+++ b/src/bin/keyin.c
@@ -223,7 +223,7 @@ key_binding_lookup(const char *keyname,
kb->hyper = hyper;
kb->len = len;
kb->keyname = alloca(sizeof(char) * len + 1);
- strncpy((char *)kb->keyname, keyname, kb->len + 1);
+ strcpy((char *)kb->keyname, keyname);
return eina_hash_find(_key_bindings, kb);
}