Add return type for tvb_strneql() and add prototype in tvbuff.h

svn path=/trunk/; revision=2395
This commit is contained in:
Gilbert Ramirez 2000-09-07 15:29:40 +00:00
parent 9b2144f9bf
commit a5b6e4ed65
2 changed files with 9 additions and 4 deletions

View File

@ -9,7 +9,7 @@
* the data of a backing tvbuff, or can be a composite of
* other tvbuffs.
*
* $Id: tvbuff.c,v 1.9 2000/09/07 13:00:12 sharpe Exp $
* $Id: tvbuff.c,v 1.10 2000/09/07 15:29:39 gram Exp $
*
* Copyright (c) 2000 by Gilbert Ramirez <gram@xiexie.org>
*
@ -981,7 +981,8 @@ tvb_find_guint8(tvbuff_t *tvb, gint offset, guint maxlength, guint8 needle)
/* Find length of string by looking for end of string ('\0'), up to
* 'max_length' characters'. Returns -1 if 'max_length' reached
* before finding EOS. */
gint tvb_strnlen(tvbuff_t *tvb, gint offset, guint maxlength)
gint
tvb_strnlen(tvbuff_t *tvb, gint offset, guint maxlength)
{
gint result_offset;
guint abs_offset, junk_length;
@ -1003,7 +1004,7 @@ gint tvb_strnlen(tvbuff_t *tvb, gint offset, guint maxlength)
*/
/* Call strncmp after checking if enough chars left, otherwise return -1 */
gint
tvb_strneql(tvbuff_t *tvb, gint offset, guint8 *str, gint size)
{
guint8 *ptr;

View File

@ -9,7 +9,7 @@
* the data of a backing tvbuff, or can be a composite of
* other tvbuffs.
*
* $Id: tvbuff.h,v 1.9 2000/08/30 02:50:05 gram Exp $
* $Id: tvbuff.h,v 1.10 2000/09/07 15:29:40 gram Exp $
*
* Copyright (c) 2000 by Gilbert Ramirez <gram@xiexie.org>
*
@ -269,6 +269,10 @@ gint tvb_get_nstringz(tvbuff_t *tvb, gint offset, guint maxlength, guint8* buffe
*/
gint tvb_get_nstringz0(tvbuff_t *tvb, gint offset, guint maxlength, guint8* buffer);
/* Call strncmp after checking if enough chars left, otherwise return -1 */
gint tvb_strneql(tvbuff_t *tvb, gint offset, guint8 *str, gint size);
/************** END OF ACCESSORS ****************/
/* Sets pd and offset so that tvbuff's can be used with code