mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-20 02:42:09 +03:00
Protect callback function calls from macro substitution
Some structure fields holding callback addresses have the same name as the underlying system function (connect, send, recv). Set parentheses around their reference to suppress a possible macro substitution. Use a macro for connect() on OS/400 to resolve a const/nonconst parameter problem.
This commit is contained in:
committed by
Daniel Stenberg
parent
8ba6bf2aef
commit
7dcf5ed6fb
@@ -688,7 +688,7 @@ libssh2_agent_connect(LIBSSH2_AGENT *agent)
|
||||
int i, rc = -1;
|
||||
for (i = 0; supported_backends[i].name; i++) {
|
||||
agent->ops = supported_backends[i].ops;
|
||||
rc = agent->ops->connect(agent);
|
||||
rc = (agent->ops->connect)(agent);
|
||||
if (!rc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user