mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 10:40:28 +09:00
Improve ssh_bind_new().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@648 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -112,14 +112,17 @@ static socket_t bind_socket(SSH_BIND *ssh_bind, const char *hostname,
|
||||
return s;
|
||||
}
|
||||
|
||||
SSH_BIND *ssh_bind_new(void){
|
||||
SSH_BIND *ptr = malloc(sizeof(SSH_BIND));
|
||||
if (ptr == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
memset(ptr,0,sizeof(*ptr));
|
||||
ptr->bindfd=-1;
|
||||
return ptr;
|
||||
SSH_BIND *ssh_bind_new(void) {
|
||||
SSH_BIND *ptr;
|
||||
|
||||
ptr = malloc(sizeof(SSH_BIND));
|
||||
if (ptr == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
ZERO_STRUCTP(ptr);
|
||||
ptr->bindfd = -1;
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void ssh_bind_set_options(SSH_BIND *ssh_bind, SSH_OPTIONS *options){
|
||||
|
||||
Reference in New Issue
Block a user