Subj : New Defects reported by Coverity Scan for Synchronet To : cov-scan@synchro.net From : scan-admin@coverity.com Date : Sat May 04 2024 12:40:02 Hi, Please find the latest report on new defect(s) introduced to Synchronet found with Coverity Scan. 1 new defect(s) introduced to Synchronet found with Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 1 of 1 defect(s) ** CID 493283: Incorrect expression (NO_EFFECT) /mqtt.c: 811 in mqtt_user_login_fail() ________________________________________________________________________________________________________ *** CID 493283: Incorrect expression (NO_EFFECT) /mqtt.c: 811 in mqtt_user_login_fail() 805 if(mqtt == NULL || mqtt->cfg == NULL || client == NULL) 806 return MQTT_FAILURE; 807 808 if(!mqtt->cfg->mqtt.enabled) 809 return MQTT_SUCCESS; 810 >>> CID 493283: Incorrect expression (NO_EFFECT) >>> Comparing an array to null is not useful: "client->protocol == NULL", since the test will always evaluate as true. 811 if(client->protocol == NULL || username == NULL) 812 return MQTT_FAILURE; 813 snprintf(topic, sizeof(topic), "login_fail/%s", client->protocol); 814 strlwr(topic); 815 snprintf(str, sizeof(str), "%s\t%s\t%s" 816 ,username ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu4gdQbQRNsarCbK0jIoVQSWT2zCPijRqaed4AhLiEI9Z7MR9SJQ09ot5XPbn9SW-2F14-3DzAgs_7FYjIqE8olEh4k02KWtt1r1LGSyuXVEtCuKuJCXgAQadI1-2FAsWIvGn-2BZ2YIPvmhLCu-2B1HFus-2FViv7odM0blgwJlSMhW5FP3Xkis4Ci7djMxV4S-2FpyGhgUj8KAvsWeecIJ1ln5YucvZvzvyf4HPVrDO8-2FLvieqY0sywMQ-2FhJEqN8WVo9AKRxOHtw7NsNWjr9Is7xQTg-2BmQd-2BBa6Z-2BXsMiSw-3D-3D --- SBBSecho 3.20-Linux * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705) .