From 4cc2acda3a0a9fca14d146648cbc5f2ace6083e9 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 29 Apr 2009 09:53:55 +0000 Subject: Improve kbdint_new. git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@637 7dcaeef0-15fb-0310-b436-a5af3365683c --- libssh/auth.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'libssh/auth.c') 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; } -- cgit