diff options
author | Andreas Schneider <mail@cynapses.org> | 2008-12-22 09:50:40 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2008-12-22 09:50:40 +0000 |
commit | c3e026c3034d5d51f011a75b191f46c3891069cf (patch) | |
tree | e8a5e16a5443bfa2fb0de3d682934b82cd164782 /include/libssh/priv.h | |
parent | a104c2eda38d2fbf81285e0223ed755783792169 (diff) | |
download | libssh-c3e026c3034d5d51f011a75b191f46c3891069cf.tar.gz libssh-c3e026c3034d5d51f011a75b191f46c3891069cf.tar.xz libssh-c3e026c3034d5d51f011a75b191f46c3891069cf.zip |
Create POSIX like sftp functions.
This breaks the API and will be libssh 0.3.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@195 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'include/libssh/priv.h')
-rw-r--r-- | include/libssh/priv.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h index 3df07b7b..c7afb423 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -636,6 +636,12 @@ int ssh_handle_packets(SSH_SESSION *session); #define enter_function() _enter_function(session) #define leave_function() _leave_function(session) +/** Zero a structure */ +#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x)) + +/** Zero a structure given a pointer to the structure */ +#define ZERO_STRUCTP(x) do { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); } while(0) + #ifdef HAVE_LIBGCRYPT /* gcrypt_missing.c */ int my_gcry_dec2bn(bignum *bn, const char *data); |