mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-20 02:42:09 +03:00
checksrc: fix EQUALSNULL warnings
`s/([a-z0-9._>*-]+) == NULL/!\1/g` Closes #964
This commit is contained in:
@@ -299,12 +299,12 @@ agent_transact_pageant(LIBSSH2_AGENT *agent, agent_transaction_ctx_t transctx)
|
||||
filemap = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE,
|
||||
0, PAGEANT_MAX_MSGLEN, mapname);
|
||||
|
||||
if(filemap == NULL || filemap == INVALID_HANDLE_VALUE)
|
||||
if(!filemap || filemap == INVALID_HANDLE_VALUE)
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_AGENT_PROTOCOL,
|
||||
"failed setting up pageant filemap");
|
||||
|
||||
p2 = p = MapViewOfFile(filemap, FILE_MAP_WRITE, 0, 0, 0);
|
||||
if(p == NULL || p2 == NULL) {
|
||||
if(!p || !p2) {
|
||||
CloseHandle(filemap);
|
||||
return _libssh2_error(agent->session, LIBSSH2_ERROR_AGENT_PROTOCOL,
|
||||
"failed to open pageant filemap for writing");
|
||||
@@ -858,7 +858,7 @@ libssh2_agent_free(LIBSSH2_AGENT *agent)
|
||||
libssh2_agent_disconnect(agent);
|
||||
}
|
||||
|
||||
if(agent->identity_agent_path != NULL)
|
||||
if(agent->identity_agent_path)
|
||||
LIBSSH2_FREE(agent->session, agent->identity_agent_path);
|
||||
|
||||
agent_free_identities(agent);
|
||||
|
||||
Reference in New Issue
Block a user