Commit e163fe19 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 db2a8acd
Pipeline #55558 passed with stage
in 7 minutes and 10 seconds
......@@ -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());
......
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