summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Kharlamov <Hi-Angel@yandex.ru>2019-03-24 02:06:59 +0300
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-04-02 18:06:30 +0000
commitbad94e88cef8b692982ed0af112e7b2191ba558b (patch)
treed86a4c7c9f82ce9f5574cbf7af55637ae876af6e
parent49c64bd1699780d9075806f79ac0270f0ea82d77 (diff)
xkbtext: fix copy-paste error
As can be seen in diff, nOut is always 0 here. The code was likely copy-pasted from comparisons further below. Fixes LGTM warning "Comparison is always false because nOut <= 0." Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
-rw-r--r--xkb/xkbtext.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c
index 00a26c576..fb17f513e 100644
--- a/xkb/xkbtext.c
+++ b/xkb/xkbtext.c
@@ -967,8 +967,7 @@ CopySetLockControlsArgs(XkbDescPtr xkb, XkbAction *action, char *buf, int *sz)
int nOut = 0;
if (tmp & XkbRepeatKeysMask) {
- snprintf(tbuf, sizeof(tbuf), "%sRepeatKeys", (nOut > 0 ? "+" : ""));
- TryCopyStr(buf, tbuf, sz);
+ TryCopyStr(buf, "RepeatKeys", sz);
nOut++;
}
if (tmp & XkbSlowKeysMask) {