coolkey/coolkey-string-literal-comparison.patch

15 lines
616 B
Diff

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=250738
slot.cpp: In member function 'void Slot::makeLabelString(char*, int, const unsigned char*)':
slot.cpp:927: warning: comparison with string literal results in unspecified behaviour
--- src/coolkey/slot.cpp
+++ src/coolkey/slot.cpp
@@ -924,7 +924,7 @@
//
#define COOLKEY "CoolKey"
#define POSSESSION " for "
- if (!personName || personName == "") {
+ if (!personName || personName[0] == '\0' ) {
const int coolKeySize = sizeof(COOLKEY) ;
memcpy(label, COOLKEY, coolKeySize-1);
makeSerialString(&label[coolKeySize], maxSize-coolKeySize, cuid);