Skip to content

Commit 8536ca1

Browse files
authored
[SYCL][NFC] Fix string comparison in handler.hpp (#1761)
It is not correct to compare c strings content using == operator.
1 parent 7146426 commit 8536ca1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/include/CL/sycl/handler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ class __SYCL_EXPORT handler {
411411
using KI = sycl::detail::KernelInfo<KernelName>;
412412
// Empty name indicates that the compilation happens without integration
413413
// header, so don't perform things that require it.
414-
if (KI::getName() != "") {
414+
if (KI::getName() != nullptr && KI::getName()[0] != '\0') {
415415
MArgs.clear();
416416
extractArgsAndReqsFromLambda(MHostKernel->getPtr(), KI::getNumParams(),
417417
&KI::getParamDesc(0));

0 commit comments

Comments
 (0)