Commit 755004ac authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Remove redundant check

Given that both pointers are not null and the size is a positive
integer, qstrncpy() can never return null.
parent c5671277
......@@ -98,9 +98,7 @@ void KeyboardInterfacePrivate::sendKeymap(Resource *resource)
if (qstrncpy(reinterpret_cast<char *>(address), keymap.constData(), keymap.size() + 1) == nullptr) {
qstrncpy(reinterpret_cast<char *>(address), keymap.constData(), keymap.size() + 1);
send_keymap(resource->handle, keymap_format::keymap_format_xkb_v1, tmp->handle(), tmp->size());
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment