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 /epan | |
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 'epan')
-rw-r--r-- | epan/ftypes/ftype-tvbuff.c | 4 | ||||
-rw-r--r-- | epan/tvbuff.c | 4 | ||||
-rw-r--r-- | epan/tvbuff.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/epan/ftypes/ftype-tvbuff.c b/epan/ftypes/ftype-tvbuff.c index 1df9ef8f71..97e3fa7ed2 100644 --- a/epan/ftypes/ftype-tvbuff.c +++ b/epan/ftypes/ftype-tvbuff.c @@ -1,5 +1,5 @@ /* - * $Id: ftype-tvbuff.c,v 1.4 2001/03/02 17:17:56 gram Exp $ + * $Id: ftype-tvbuff.c,v 1.5 2001/03/13 21:34:28 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -60,7 +60,7 @@ len(fvalue_t *fv) static void slice(fvalue_t *fv, GByteArray *bytes, guint offset, guint length) { - guint8* data; + const guint8* data; if (fv->value.tvb) { TRY { diff --git a/epan/tvbuff.c b/epan/tvbuff.c index 07104dd121..d2152bc679 100644 --- a/epan/tvbuff.c +++ b/epan/tvbuff.c @@ -9,7 +9,7 @@ * the data of a backing tvbuff, or can be a composite of * other tvbuffs. * - * $Id: tvbuff.c,v 1.14 2000/12/27 12:48:27 guy Exp $ + * $Id: tvbuff.c,v 1.15 2001/03/13 21:34:27 gram Exp $ * * Copyright (c) 2000 by Gilbert Ramirez <gram@xiexie.org> * @@ -936,7 +936,7 @@ tvb_memdup(tvbuff_t *tvb, gint offset, gint length) -guint8* +const guint8* tvb_get_ptr(tvbuff_t *tvb, gint offset, gint length) { return ensure_contiguous(tvb, offset, length); diff --git a/epan/tvbuff.h b/epan/tvbuff.h index e205e1a6c4..21f224fbb4 100644 --- a/epan/tvbuff.h +++ b/epan/tvbuff.h @@ -9,7 +9,7 @@ * the data of a backing tvbuff, or can be a composite of * other tvbuffs. * - * $Id: tvbuff.h,v 1.10 2000/12/27 12:48:27 guy Exp $ + * $Id: tvbuff.h,v 1.11 2001/03/13 21:34:27 gram Exp $ * * Copyright (c) 2000 by Gilbert Ramirez <gram@xiexie.org> * @@ -268,7 +268,7 @@ guint8* tvb_memdup(tvbuff_t*, gint offset, gint length); * and the pointer to the newly-contiguous data is returned. This dynamically- * allocated memory will be freed when the tvbuff is freed, after the * tvbuff_free_cb_t() is called, if any. */ -guint8* tvb_get_ptr(tvbuff_t*, gint offset, gint length); +const guint8* tvb_get_ptr(tvbuff_t*, gint offset, gint length); /* Find first occurence of any of the needles in tvbuff, starting at offset. * Searches at most maxlength number of bytes; if maxlength is -1, searches |