diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-04-07 09:25:23 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-04-07 09:25:23 +0000 |
commit | 69a945b5cefcb4b0ad3c1fd8486981fa5babe733 (patch) | |
tree | 8ab556484a5bb88ca3d911d9f97ab43abdc7c845 /packet-mount.c | |
parent | eb7e6cf594ec3ed8c6f2df0cc1e85cf9aca279d7 (diff) |
If we do "offset = dissect_rpc_XXX_tvb(...)", we have to do so
regardless of whether the protocol tree argument is null or not;
otherwise, we don't end up updating the offset field correctly if the
argument is null. (The "dissect_rpc_XXX_tvb(...)" routines won't try to
add something to the tree if their "tree" argument is null, so it's safe
to call them with a null "tree" argument.)
svn path=/trunk/; revision=3270
Diffstat (limited to 'packet-mount.c')
-rw-r--r-- | packet-mount.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/packet-mount.c b/packet-mount.c index 10e991ac84..ff9c58ef73 100644 --- a/packet-mount.c +++ b/packet-mount.c @@ -1,7 +1,7 @@ /* packet-mount.c * Routines for mount dissection * - * $Id: packet-mount.c,v 1.22 2001/03/15 21:50:32 guy Exp $ + * $Id: packet-mount.c,v 1.23 2001/04/07 09:25:23 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -94,9 +94,7 @@ dissect_fhstatus(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree gint32 status; status=tvb_get_ntohl(tvb,offset); - if (tree) { - offset = dissect_rpc_uint32_tvb(tvb,pinfo,tree,hf_mount3_status,offset); - } + offset = dissect_rpc_uint32_tvb(tvb,pinfo,tree,hf_mount3_status,offset); switch (status) { case 0: @@ -474,10 +472,7 @@ dissect_mountstat3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offs mountstat3 = tvb_get_ntohl(tvb, offset); - if (tree) { - offset = dissect_rpc_uint32_tvb(tvb,pinfo,tree,hfindex,offset); - } - + offset = dissect_rpc_uint32_tvb(tvb,pinfo,tree,hfindex,offset); *status = mountstat3; return offset; } |