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>
This commit is contained in:
Konstantin Kharlamov 2019-03-24 02:06:59 +03:00 committed by Alan Coopersmith
parent 49c64bd169
commit bad94e88ce

View File

@ -967,8 +967,7 @@ CopySetLockControlsArgs(XkbDescPtr xkb, XkbAction *action, char *buf, int *sz)
int nOut = 0; int nOut = 0;
if (tmp & XkbRepeatKeysMask) { if (tmp & XkbRepeatKeysMask) {
snprintf(tbuf, sizeof(tbuf), "%sRepeatKeys", (nOut > 0 ? "+" : "")); TryCopyStr(buf, "RepeatKeys", sz);
TryCopyStr(buf, tbuf, sz);
nOut++; nOut++;
} }
if (tmp & XkbSlowKeysMask) { if (tmp & XkbSlowKeysMask) {