diff options
author | Stef Walter <stefw@collabora.co.uk> | 2011-04-18 13:16:49 +0200 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2011-04-18 13:23:40 +0200 |
commit | aa2c68cac2fb76a3b3d1dc1115d608e5a1b9e402 (patch) | |
tree | 92176b0de16f9ce59ca314088c6ec243b7028a4c /egg | |
parent | 908351a45a37e66fc2bc45883961f21385789045 (diff) | |
download | gnome-keyring-aa2c68cac2fb76a3b3d1dc1115d608e5a1b9e402.tar.gz |
Use gpointer instead of guchar in several places.
This makes for cleaner and simpler code.
Diffstat (limited to 'egg')
-rw-r--r-- | egg/egg-openssl.c | 8 | ||||
-rw-r--r-- | egg/egg-openssl.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/egg/egg-openssl.c b/egg/egg-openssl.c index 2e83e63e..f22a2bdc 100644 --- a/egg/egg-openssl.c +++ b/egg/egg-openssl.c @@ -234,7 +234,7 @@ egg_openssl_headers_new (void) } guint -egg_openssl_pem_parse (const guchar *data, gsize n_data, +egg_openssl_pem_parse (gconstpointer data, gsize n_data, EggOpensslPemCallback callback, gpointer user_data) { const gchar *beg, *end; @@ -258,7 +258,7 @@ egg_openssl_pem_parse (const guchar *data, gsize n_data, g_assert (type); /* This returns the character position before the PEM END header */ - end = pem_find_end ((const gchar*)beg, n_data - ((const guchar*)beg - data), type); + end = pem_find_end ((const gchar*)beg, n_data - ((const gchar*)beg - (const gchar *)data), type); if (!end) break; @@ -274,8 +274,8 @@ egg_openssl_pem_parse (const guchar *data, gsize n_data, /* Try for another block */ end += PEM_SUFF_L; - n_data -= (const guchar*)end - data; - data = (const guchar*)end; + n_data -= (const gchar*)end - (const gchar*)data; + data = end; } if (headers) diff --git a/egg/egg-openssl.h b/egg/egg-openssl.h index 878cf589..3253d73e 100644 --- a/egg/egg-openssl.h +++ b/egg/egg-openssl.h @@ -31,7 +31,7 @@ typedef void (*EggOpensslPemCallback) (GQuark type, const guchar *data, gsize n_ GHashTable* egg_openssl_headers_new (void); -guint egg_openssl_pem_parse (const guchar *data, gsize n_data, +guint egg_openssl_pem_parse (gconstpointer data, gsize n_data, EggOpensslPemCallback callback, gpointer user_data); |