Fixes to Coverity issues 72728, 72755, 72745
This commit is contained in:
VilhoRaatikka
2014-11-05 14:41:04 +02:00
parent 5886ac3d31
commit 8b91a5f078
3 changed files with 45 additions and 15 deletions

View File

@ -855,9 +855,6 @@ static int uh_cmpfun( void* v1, void* v2) {
if (v1 == NULL || v2 == NULL)
return 0;
if (hu1 == NULL || hu2 == NULL)
return 0;
if (hu1->user == NULL || hu2->user == NULL)
return 0;
@ -961,9 +958,6 @@ char *mysql_format_user_entry(void *data)
entry = (MYSQL_USER_HOST *) data;
if (entry == NULL)
return NULL;
mysql_user = (char *) calloc(mysql_user_len, sizeof(char));
if (mysql_user == NULL)

View File

@ -1155,10 +1155,9 @@ dcb_close(DCB *dcb)
} else {
LOGIF(LE, (skygw_log_write(
LOGFILE_ERROR,
"%lu [dcb_close] Error : Removing dcb %p in state %s from "
"Error : Removing DCB fd == %d in state %s from "
"poll set failed.",
pthread_self(),
dcb,
dcb->fd,
STRDCBSTATE(dcb->state))));
}
@ -1670,7 +1669,7 @@ static bool dcb_set_state_nomutex(
"Old state %s > new state %s.",
pthread_self(),
dcb,
STRDCBSTATE(*old_state),
(old_state == NULL ? "NULL" : STRDCBSTATE(*old_state)),
STRDCBSTATE(new_state))));
}
return succp;