diff options
Diffstat (limited to 'src/misc.c')
-rw-r--r-- | src/misc.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -23,7 +23,6 @@ #include <stdlib.h> #include <string.h> #include <stdarg.h> -#include <assert.h> #include <unistd.h> #include "g10lib.h" @@ -66,14 +65,14 @@ write2stderr( const char *s ) write( 2, s, strlen(s) ); } -/**************** +/* * This function is called for fatal errors. A caller might want to - * set his own handler becuase this function simply calls abort(). + * set his own handler because this function simply calls abort(). */ void _gcry_fatal_error (int rc, const char *text) { - if (! text) /* get a default text */ + if ( !text ) /* get a default text */ text = gpg_strerror (rc); if (fatal_error_handler) @@ -86,10 +85,10 @@ _gcry_fatal_error (int rc, const char *text) } void -gcry_set_log_handler( void (*logf)(void*,int, const char*, va_list ), +gcry_set_log_handler( void (*f)(void*,int, const char*, va_list ), void *opaque ) { - log_handler = logf; + log_handler = f; log_handler_value = opaque; } @@ -234,7 +233,7 @@ _gcry_burn_stack (int bytes) { char buf[64]; - memset (buf, 0, sizeof buf); + wipememory (buf, sizeof buf); bytes -= sizeof buf; if (bytes > 0) _gcry_burn_stack (bytes); |