From 5664e5887f4da905f94035556eb232611796cee2 Mon Sep 17 00:00:00 2001 From: Gilbert Ramirez Date: Tue, 13 Mar 2001 21:34:28 +0000 Subject: Make tvb_get_ptr() return 'const guint8*', and clean up all the usages of tvb_get_ptr(). packet-ieee80211.c still has one bad usage, in which it *does* modify the tvbuff's data. svn path=/trunk/; revision=3128 --- packet-cups.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'packet-cups.c') diff --git a/packet-cups.c b/packet-cups.c index e8bf42ca5d..bf9c4638c9 100644 --- a/packet-cups.c +++ b/packet-cups.c @@ -5,7 +5,7 @@ * Charles Levert * Copyright 2001 Charles Levert * -* $Id: packet-cups.c,v 1.1 2001/03/11 02:08:30 guy Exp $ +* $Id: packet-cups.c,v 1.2 2001/03/13 21:34:23 gram Exp $ * * * This program is free software; you can redistribute it and/or @@ -136,9 +136,9 @@ static guint get_hex_uint(tvbuff_t *tvb, gint offset, gint *next_offset); static void get_space(tvbuff_t *tvb, gint offset, gint *next_offset); -static guint8* get_quoted_string(tvbuff_t *tvb, gint offset, +static const guint8* get_quoted_string(tvbuff_t *tvb, gint offset, gint *next_offset, guint *len); -static guint8* get_unquoted_string(tvbuff_t *tvb, gint offset, +static const guint8* get_unquoted_string(tvbuff_t *tvb, gint offset, gint *next_offset, guint *len); /**********************************************************************/ @@ -153,7 +153,7 @@ dissect_cups(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) gint next_offset; guint len; unsigned int u; - guint8 *str; + const guint8 *str; cups_ptype_t ptype; unsigned int state; @@ -287,11 +287,11 @@ get_space(tvbuff_t *tvb, gint offset, gint *next_offset) return; } -static guint8* +static const guint8* get_quoted_string(tvbuff_t *tvb, gint offset, gint *next_offset, guint *len) { int c; - guint8* s = 0; + const guint8* s = NULL; guint l = 0; gint o; @@ -312,10 +312,10 @@ get_quoted_string(tvbuff_t *tvb, gint offset, gint *next_offset, guint *len) return s; } -static guint8* +static const guint8* get_unquoted_string(tvbuff_t *tvb, gint offset, gint *next_offset, guint *len) { - guint8* s = 0; + const guint8* s = NULL; guint l = 0; gint o; -- cgit v1.2.3