From b803ea8616478bff6c0cb75101784b6dd20ac359 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 8 Apr 2010 16:40:41 -0500 Subject: [PATCH] ppp: Fix make some functions const correct --- gatchat/gatppp.c | 2 +- gatchat/ppp.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c index 701059b9..cac0f1aa 100644 --- a/gatchat/gatppp.c +++ b/gatchat/gatppp.c @@ -499,7 +499,7 @@ void ppp_generate_event(GAtPPP *ppp, enum ppp_event event) } } -void ppp_set_auth(GAtPPP *ppp, guint8* auth_data) +void ppp_set_auth(GAtPPP *ppp, const guint8* auth_data) { guint16 proto = get_host_short(auth_data); diff --git a/gatchat/ppp.h b/gatchat/ppp.h index cef5cc64..03540500 100644 --- a/gatchat/ppp.h +++ b/gatchat/ppp.h @@ -49,13 +49,13 @@ struct packed_long { guint32 l; } __attribute__((packed)); -static inline guint32 __get_unaligned_long(const gpointer p) +static inline guint32 __get_unaligned_long(const void *p) { const struct packed_long *ptr = p; return ptr->l; } -static inline guint16 __get_unaligned_short(const gpointer p) +static inline guint16 __get_unaligned_short(const void *p) { const struct packed_short *ptr = p; return ptr->s; @@ -92,7 +92,7 @@ struct ppp_net_data { void ppp_debug(GAtPPP *ppp, const char *str); void ppp_generate_event(GAtPPP *ppp, enum ppp_event event); void ppp_transmit(GAtPPP *ppp, guint8 *packet, guint infolen); -void ppp_set_auth(GAtPPP *ppp, guint8 *auth_data); +void ppp_set_auth(GAtPPP *ppp, const guint8 *auth_data); void ppp_set_recv_accm(GAtPPP *ppp, guint32 accm); void ppp_set_xmit_accm(GAtPPP *ppp, guint32 accm); void ppp_set_pfc(GAtPPP *ppp, gboolean pfc);