diff options
author | rbuj <[email protected]> | 2020-01-27 14:42:34 +0100 |
---|---|---|
committer | lukefromdc <[email protected]> | 2020-01-28 20:14:14 +0000 |
commit | 89ec6dd6bc5daa8c67c75e836c613a71d8d6a486 (patch) | |
tree | f6a4af49de59c08bcc10c0b4968fcf226ca8c854 | |
parent | 3aaa9f0e9105f28d0e82a64ff1e9b2cd1bf30d75 (diff) | |
download | libmatekbd-89ec6dd6bc5daa8c67c75e836c613a71d8d6a486.tar.bz2 libmatekbd-89ec6dd6bc5daa8c67c75e836c613a71d8d6a486.tar.xz |
matekbd-keyboard-config: Value stored to 'clen' is never read
-rw-r--r-- | libmatekbd/matekbd-keyboard-config.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libmatekbd/matekbd-keyboard-config.c b/libmatekbd/matekbd-keyboard-config.c index 40b4022..7338e28 100644 --- a/libmatekbd/matekbd-keyboard-config.c +++ b/libmatekbd/matekbd-keyboard-config.c @@ -153,7 +153,7 @@ matekbd_keyboard_config_split_items (const gchar * merged, gchar ** parent, { static gchar pbuffer[XKL_MAX_CI_NAME_LENGTH]; static gchar cbuffer[XKL_MAX_CI_NAME_LENGTH]; - int plen, clen; + int plen; const gchar *pos; *parent = *child = NULL; @@ -163,11 +163,9 @@ matekbd_keyboard_config_split_items (const gchar * merged, gchar ** parent, pos = strchr (merged, '\t'); if (pos == NULL) { plen = strlen (merged); - clen = 0; } else { plen = pos - merged; - clen = strlen (pos + 1); - if (clen >= XKL_MAX_CI_NAME_LENGTH) + if (strlen (pos + 1) >= XKL_MAX_CI_NAME_LENGTH) return FALSE; strcpy (*child = cbuffer, pos + 1); } |