aboutsummaryrefslogtreecommitdiffstats
path: root/packet-scsi.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-12-02 23:43:30 +0000
committerGuy Harris <guy@alum.mit.edu>2002-12-02 23:43:30 +0000
commit59932f27227c4769be94fb46936d123d1770c1a2 (patch)
treedd1b62868737457d51efa73389ae4975567f4fe3 /packet-scsi.c
parent8414298f8921489c6174c24d4363c391822e83c5 (diff)
Don't cast away constness, and fix variable and structure member
qualifiers as necessary to ensure that we don't have to. "strcmp()", "strcasecmp()", and "memcmp()" don't return booleans; don't test their results as if they did. Use "guint8", not "guchar", for a pointer to (one or more) 8-bit bytes. Update Michael Tuexen's e-mail address. svn path=/trunk/; revision=6726
Diffstat (limited to 'packet-scsi.c')
-rw-r--r--packet-scsi.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/packet-scsi.c b/packet-scsi.c
index f5e720f586..d6d7322ec0 100644
--- a/packet-scsi.c
+++ b/packet-scsi.c
@@ -2,7 +2,7 @@
* Routines for decoding SCSI CDBs and responses
* Author: Dinesh G Dutt (ddutt@cisco.com)
*
- * $Id: packet-scsi.c,v 1.21 2002/10/08 19:35:08 guy Exp $
+ * $Id: packet-scsi.c,v 1.22 2002/12/02 23:43:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1206,8 +1206,8 @@ static dissector_handle_t data_handle;
static gint
scsi_equal(gconstpointer v, gconstpointer w)
{
- scsi_task_id_t *v1 = (scsi_task_id_t *)v;
- scsi_task_id_t *v2 = (scsi_task_id_t *)w;
+ const scsi_task_id_t *v1 = (const scsi_task_id_t *)v;
+ const scsi_task_id_t *v2 = (const scsi_task_id_t *)w;
return (v1->conv_id == v2->conv_id && v1->task_id == v2->task_id);
}
@@ -1215,7 +1215,7 @@ scsi_equal(gconstpointer v, gconstpointer w)
static guint
scsi_hash (gconstpointer v)
{
- scsi_task_id_t *key = (scsi_task_id_t *)v;
+ const scsi_task_id_t *key = (const scsi_task_id_t *)v;
guint val;
val = key->conv_id + key->task_id;
@@ -1226,8 +1226,8 @@ scsi_hash (gconstpointer v)
static gint
scsidev_equal (gconstpointer v, gconstpointer w)
{
- scsi_devtype_key_t *k1 = (scsi_devtype_key_t *)v;
- scsi_devtype_key_t *k2 = (scsi_devtype_key_t *)w;
+ const scsi_devtype_key_t *k1 = (const scsi_devtype_key_t *)v;
+ const scsi_devtype_key_t *k2 = (const scsi_devtype_key_t *)w;
if (ADDRESSES_EQUAL (&k1->devid, &k2->devid))
return 1;
@@ -1238,7 +1238,7 @@ scsidev_equal (gconstpointer v, gconstpointer w)
static guint
scsidev_hash (gconstpointer v)
{
- scsi_devtype_key_t *key = (scsi_devtype_key_t *)v;
+ const scsi_devtype_key_t *key = (const scsi_devtype_key_t *)v;
guint val;
int i;