Remove redundant check
Given that both pointers are not null and the size is a positive integer, qstrncpy() can never return null.
This commit is contained in:
parent
c56712776a
commit
755004acd0
1 changed files with 1 additions and 3 deletions
|
@ -98,9 +98,7 @@ void KeyboardInterfacePrivate::sendKeymap(Resource *resource)
|
|||
return;
|
||||
}
|
||||
|
||||
if (qstrncpy(reinterpret_cast<char *>(address), keymap.constData(), keymap.size() + 1) == nullptr) {
|
||||
return;
|
||||
}
|
||||
qstrncpy(reinterpret_cast<char *>(address), keymap.constData(), keymap.size() + 1);
|
||||
tmp->unmap(address);
|
||||
|
||||
send_keymap(resource->handle, keymap_format::keymap_format_xkb_v1, tmp->handle(), tmp->size());
|
||||
|
|
Loading…
Reference in a new issue