[Coverity] Add proper NULL check before comparison

This commit is contained in:
baldurk
2016-09-14 17:41:14 +02:00
parent 31a06effb6
commit c9eeef3151
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1187,7 +1187,7 @@ RENDERDOC_CreateRemoteServerConnection(const char *host, uint32_t port, RemoteSe
if(host != NULL && host[0] != '\0')
s = host;
if(!strncmp(host, "adb:", 4))
if(host != NULL && !strncmp(host, "adb:", 4))
{
s = "127.0.0.1";
+1 -1
View File
@@ -707,7 +707,7 @@ extern "C" RENDERDOC_API TargetControl *RENDERDOC_CC RENDERDOC_CreateTargetContr
bool android = false;
if(!strncmp(host, "adb:", 4))
if(host != NULL && !strncmp(host, "adb:", 4))
{
android = true;
s = "127.0.0.1";
+1 -1
View File
@@ -477,7 +477,7 @@ extern "C" RENDERDOC_API uint32_t RENDERDOC_CC RENDERDOC_EnumerateRemoteTargets(
if(host != NULL && host[0] != '\0')
s = host;
if(!strncmp(host, "adb:", 4))
if(host != NULL && !strncmp(host, "adb:", 4))
{
s = "127.0.0.1";