Fix Clang warnings: comparison of array != a null pointer is always true

warning: comparison of array 'known_zones[i].tzName' not equal to a null
pointer is always true [-Wtautological-pointer-compare]
                        for (int i=0; known_zones[i].tzName != 0; i++) {
This commit is contained in:
Phenom 2017-04-07 18:48:40 +02:00 committed by csoler
parent 0bbd1499d4
commit 76f7573659

View File

@ -651,7 +651,7 @@ static time_t parseRFC822Date(const std::string &pubDate)
offset = abs(offset);
offset = ((offset / 100)*60 + (offset % 100))*sgn;
} else {
for (int i=0; known_zones[i].tzName != 0; i++) {
for (int i=0; known_zones[i].tzName[0] != 0; i++) {
if (0 == strncasecmp(dateString, known_zones[i].tzName, strlen(known_zones[i].tzName))) {
offset = known_zones[i].tzOffset;
break;