diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2001-03-13 21:34:28 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2001-03-13 21:34:28 +0000 |
commit | 5664e5887f4da905f94035556eb232611796cee2 (patch) | |
tree | d7075be8e004cc316e2e87d695012482960173ae /packet-cups.c | |
parent | d820905672fc2bbac7c609c1628e22dcbb3e2827 (diff) |
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
Diffstat (limited to 'packet-cups.c')
-rw-r--r-- | packet-cups.c | 16 |
1 files changed, 8 insertions, 8 deletions
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 <charles@comm.polymtl.ca> * 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; |