Force the "fmt" argument of val_to_str() to be non-null. Change the 9P
dissector to use a non-null format. Fixes bug 70. Fix the line endings in the 9P dissector, and set its SVN properties. svn path=/trunk/; revision=14127
This commit is contained in:
parent
cb95a1d842
commit
7a412fadf3
|
@ -2,7 +2,7 @@
|
|||
* Routines for 9P dissection
|
||||
* Copyright 2005, Nils O. Selåsdal
|
||||
*
|
||||
* $Id: $
|
||||
* $Id$
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -171,7 +171,7 @@ static void dissect_9P(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
ninesz = tvb_get_letohl(tvb, offset);
|
||||
ninemsg = tvb_get_guint8(tvb, offset + 4);
|
||||
|
||||
mname = val_to_str(ninemsg, ninep_msg_type,NULL);
|
||||
mname = val_to_str(ninemsg, ninep_msg_type, "unknown: %u");
|
||||
|
||||
if (check_col(pinfo->cinfo, COL_INFO)) {
|
||||
if(mname == NULL) {
|
||||
|
|
|
@ -44,6 +44,8 @@ val_to_str(guint32 val, const value_string *vs, const char *fmt) {
|
|||
static gchar str[3][64];
|
||||
static gchar *cur;
|
||||
|
||||
g_assert(fmt != NULL);
|
||||
|
||||
ret = match_strval(val, vs);
|
||||
if (ret != NULL)
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue