diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-04-29 09:53:55 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-04-29 09:53:55 +0000 |
commit | 4cc2acda3a0a9fca14d146648cbc5f2ace6083e9 (patch) | |
tree | 9c4d3bb16c77a03a5d9f81842d2ec01da9d8cfe8 /libssh/auth.c | |
parent | 2c75ad7e19dd79ef94e45788d8cfa94ca0844151 (diff) | |
download | libssh-4cc2acda3a0a9fca14d146648cbc5f2ace6083e9.tar.gz libssh-4cc2acda3a0a9fca14d146648cbc5f2ace6083e9.tar.xz libssh-4cc2acda3a0a9fca14d146648cbc5f2ace6083e9.zip |
Improve kbdint_new.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@637 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/auth.c')
-rw-r--r-- | libssh/auth.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libssh/auth.c b/libssh/auth.c index dc063ef..f2e449f 100644 --- a/libssh/auth.c +++ b/libssh/auth.c @@ -925,14 +925,16 @@ int ssh_userauth_autopubkey(SSH_SESSION *session, const char *passphrase) { return SSH_AUTH_DENIED; } -static struct ssh_kbdint *kbdint_new() { - struct ssh_kbdint *kbd = malloc(sizeof (struct ssh_kbdint)); +static struct ssh_kbdint *kbdint_new(void) { + struct ssh_kbdint *kbd; - if (kbd == NULL) { - return NULL; - } - memset(kbd,0,sizeof(*kbd)); - return kbd; + kbd = malloc(sizeof (struct ssh_kbdint)); + if (kbd == NULL) { + return NULL; + } + ZERO_STRUCTP(kbd); + + return kbd; } |